First: action is an attribute of the form. HTML5 has defined it as a required attribute value. onSubmit is an event. A function verification is performed when submitting through . .
Second: When it comes to the order of execution, my personal understanding is that onSubmit comes first, and verification comes first. When verification returns false, the action="url" address cannot be reached. If true is returned or there is no return value, pass and redirect to the url address.