标签:$.ajax 表单 type cti jaxb form post success orm
<script type="text/javascript">
$(function() {
//1、ajax提交
$("#ajaxBtn").click(function() {
var params = $("#myform").serialize();
$.ajax( {
type : "POST",
url : "RegisterAction.action",
data : params,
success : function(msg) {
alert("success: " + msg);
}
});
})
//2、jQuery提交
$("#jqueryBtn").click(function(){
$("#myform").submit();
})
//3、js提交
$("#jsBtn").click(function(){
document.myform.action="RegisterAction.action";
document.myform.submit();
})
})
function sumbitTest(){
return true; //return false则不会提交
}
</script>
标签:$.ajax 表单 type cti jaxb form post success orm
原文地址:https://www.cnblogs.com/chengeng/p/9488263.html