Created
August 8, 2014 04:13
-
-
Save turbotree/dd539b0f4b4b0f57834c to your computer and use it in GitHub Desktop.
使用Jquery异步提交表单
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url:"mobileSurveyAction_addSurvey.action",//提交地址 | |
data:$("#form1").serialize(),//将表单数据序列化 | |
type:"POST", | |
dataType:"json", | |
success:function(result){ | |
if (result.success == '100'){ | |
$("#mySection").hide(); | |
$(".footer").hide(); | |
$("#alertMsg").show(); | |
}else{ | |
alert("失败!"); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment