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

后端 未结 4 1072
天命终不由人
天命终不由人 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:37

    onsubmit is executed first in order to check the format etc. Then action is executed to get/post the data to the backend.

提交回复
热议问题