A form's “action” and “onsubmit”: Which executes first?

后端 未结 4 1077
天命终不由人
天命终不由人 2020-12-16 16:08

I\'m trying to debug a webpage and I see a form element whose opening is

4条回答
  •  清歌不尽
    2020-12-16 16:35

    The onsubmit must execute first, as returning false from it stops the form being submitted, and thus the action ever being requested.

提交回复
热议问题