通过ajax提交form表单

$.ajax({
  url : 'deliveryWarrant/update.do',
  data : $('#myform').serialize(),
  type : "POST",
  success : function(data) {
    var res = eval('(' + data + ')');
    if (res && res.success == true) {
      alert(res.message);
    location.href="/godownWarrant/findToDeliveryWarrant.do?godownWarrant.code="+$("#myform input[name=godownWarrant\\.code]").val();
    } else {
      alert(res.message);
    }
  }
});

posted @ 2013-06-17 16:23  若 ♂ 只如初见  阅读(272)  评论(0编辑  收藏  举报