What is the difference between button buttons and submit in HTML?

Source: Internet
Author: User

Type=button is simply a button function;
Type=submit is to send a form; If so, can you replace button with submit?

Sumit submit the form, the button needs to bind the event can not be used to submit data can not, for example, you want to implement a partial refresh, you can not use the Sumit, with the button to bind the event, if the event with the Sumit binding events, the trigger event colleagues, will also submit the form of ...

button-Normal button, submit-submit button; The Submit button generally appears on the Web page need to submit information to the server is only used, and button is to create a button, for the implementation of the button will be what happens this does not necessarily, the test Page editor decided, For example, on the same day Web form, when user input may enter errors or deviations, you can create a button-clear (reset) button on a Web page, a form can have multiple normal buttons, and at least one submit button (to submit a form page).

Original link: http://zhidao.baidu.com/link?url= Pkcttjhjvhtp3xqlrt3jkem17qjkcmtn3cvwickbg-csgp64gufslghqjc7lm-zwon4cc526udiismtnxfm5b_

What is the difference between button buttons and submit in HTML?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.