能够在form上加一个onsubmit事件,表单提交前作一些检测,也能够修改表单的值,返回true时,表单会被提交,返回false则提交动做被终止jquery
<form id='submit' action="submitpage.htm" onsubmit="return validate_form(this)" method="post">
jquery添加绑定事件ide
$('#submit').submit(function(){post
return true;
this
})spa