我正在使用 jQuery Validate 插件submitHandler
来禁用提交按钮,但是一旦表单提交按钮被禁用,我必须等待 5-10 秒才能将表单发布到其他页面?下面的整个代码,很奇怪?它可能是超时的东西?
<script src="http://code.jquery.com/jquery-1.7.2.js" type="text/javascript"></script>
<script src="http://jquery.bassistance.de/validate/jquery.validate.js"></script>
<script src="http://jquery.bassistance.de/validate/additional-methods.js"></script>
<script>
$( "#UploadForm" ).validate({
errorLabelContainer: "#messageBox",
wrapper: "td",
rules: {
name: {
required: true
}
},
submitHandler: function (form) {
$('#submit').attr('disabled','disabled');
form.submit();
}
});
</script>