Rule document for HTML webpage form submission

Source: Internet
Author: User

Recently, I am working on an HTML parsing engine, which is particularly confusing when processing <FORM> forms. Based on the experience of the past week, I would like to summarize the HTML form submission rules.

<INPUT>
TYPE = BUTTON
Never submit

<INPUT> TYPE = CHECKBOX: Submit only after checking
<INPUT> TYPE = FILE is always submitted, even if it is null
<INPUT> TYPE = HIDDEN submit forever, even if it is null
<INPUT> TYPE = IMAGE is always submitted, even if it is null
<INPUT> TYPE = PASSWORD: always submit, even if it is null
<INPUT> TYPE = RADIO is submitted only after it is selected. If a group of Radio is not selected, It is not submitted.
<INPUT> TYPE = RESET never submit

<INPUT> TYPE = specifies the button to be clicked by SUBMIT. The value of this button is submitted. Other values of the SUBMIT button are not submitted.
If the form submission is triggered by a JavaScript script, no value is submitted.

<INPUT> TYPE = TEXT is always submitted, even if it is null
<BUTTON>
TYPE = BUTTON
Never submit

<BUTTON> TYPE = RESET never submit
<BUTTON> TYPE = BUTTON clicked by SUBMIT to SUBMIT the value of this BUTTON.
If the TYPE is omitted, IE defaults to BUTTON, and Firefox defaults to SUBMIT.
<SELECT>
NONE
Submit permanently, even if it is null.
<TEXTAREA>
NONE is always submitted, even if it is null.

Related Article

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.