How do I do a jQuery blocking AJAX call without async = false?

后端 未结 6 1669
梦毁少年i
梦毁少年i 2021-01-01 22:04

I have a page which does AJAX validation of an email before continuing on to the next page, using the HTML5 setCustomValidity() method [using the webshims library for older

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-01 23:02

    If you are really set on not letting them submit the form until you have checked the email validity, start out your submit button with the disabled attribute, then have the callback set $('form button').removeAttr('disabled');

    That being said, I'm with the other people - just let them submit the form! Usually people get it right and you pass them right on through with no errors...

提交回复
热议问题