jquery提交form表单解决办法分享
内容摘要
复制代码 代码如下:$.ajax({ url : 'deliveryWarrant/update.do', data : $('#myform').serialize(), type : "POST", success : function(data) { var
文章正文
复制代码 代码如下:
$.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="/form.php?godownWarrant.code="+$("#myform input[name=godownWarrant\\.code]").val();
} else {
alert(res.message);
}
}
});
代码注释