我对我们制作的jQuery控件有一些问题.假设您有一个下拉列表,允许您输入要查找的项目的ID,当您在文本框中按Enter键或失go 焦点时,它会通过jQuery验证您输入的ID是否正确,如果不正确则会显示警告.
The thing is that when an ordinary user enters an invalid value in it and loses focus by pressing the submit button, the jQuery post returns after the submit of the form has been sent.
有什么方法可以让我判断jQuery是否有任何异步请求处理,这样我就不允许提交表单了吗?