jQuery - Cancel form submit (using “return false”?)?

后端 未结 12 1645
盖世英雄少女心
盖世英雄少女心 2020-12-19 04:00

I\'m running into a bit of trouble while trying to cancel the submit of a form. I\'ve been following this tutorial (even though i\'m not making a login script), and it seems

12条回答
  •  遥遥无期
    2020-12-19 04:45

    You indicate that "that the alert before the 'return false' doesn't show".

    When using jQuery, the id or name of the submit element can not be 'submit' - if it is, then the submit event won't be fired.

提交回复
热议问题