Action is the property of form, OnSubmit is the event, to say the order of execution, personal understanding is onsubmit first.
First: Action is the property of the form, HTML5 has defined it as a required property value, OnSubmit is an event, and a function validation is performed by <input type= "Submit"/> commit.
Second: To say the order of execution, personal understanding is onsubmit First, verify, verify return False, you cannot reach the action= "url" address. If true is returned or no return value is, then the URL address is passed and turned.
Copy CodeThe code is as follows:
Copy CodeThe code is as follows:
Onsubmit= "return fun" here is the return must be written, do not write? Do not write you can try!!!
In summary: OnSubmit is the verification that the action is the link address after the jump.
The action and onsubmit examples of form forms are described in