Type = button:It is simply a button function.
Type = submit:Submit Form
For example:
<Input type = "submit" name = "name" value = "submit" onclick = "on_submit_click ()"/>
<Input type = "buttont" name = "name" value = "Submit" onclick = "on_submit_click ()"/>
After clicking the submit button, the first one is forwarded to the action, which is automatically submitted. The onclick function is not used;
The second step is to execute the onclick function and jump to Js. Form submission in JS is as follows:
Document. form name. Submit ();
In addition, people engaged in Web UI should note that using submit to improve the ease of use of pages:
After submit is used, the page supports the Enter key operation. Many Web software designers may not notice that the submit is unified.
After a button is used, the page usually does not support the Enter key. Therefore, the Enter key must be supported and a submit must be set. The default enter key is used to operate the first submit on the page.