<script language="JavaScript">
$(document).ready(function() {
$('#YOUR_FORM').submit(function() {
$.ajax({ // create an AJAX call...
data: $(this).serialize(), // get the form data
type: $(this).attr('method'), // GET or POST
url: $(this).attr('action'), // the file to call
success: function(response) { // on success..
//check the response and disable submit button
}
});
return false;
});
});
</script>
一种方法是使用ajax提交表单,然后解析响应,然后基于该响应禁用按钮。在
相关问题 更多 >
编程相关推荐