Differences between simplified HTML form label and normal syntax

Source: Internet
Author: User

CodeDemo and download: http://web-developer-tips.appspot.com/label/

 

Complete label syntax in HTML form, using:

<Label for = "gender"> Gender: </label> <input type = "radio" name = "gender" id = "gender" value = "1"/>

Abbreviated as:

<Label> Gender: <input type = "radio" name = "gender" value = "1"/> </label>

Conclusion: GTE IE7, Firefox, and chrome support label shorthand. Click the text to select radio. IE6 does not support label shorthand. clicking the text does not select radio.

NOTE: If label is abbreviated, click label once. Label onclick, input onclick, and label onclick (GTE IE7, Firefox, and chrome) are executed ).

Note: When the label is abbreviated as "label", the input onclick and label onclick (GTE IE6, Firefox, and chrome) are executed once ).

When the label is fully written, click the label once. The label onclick and input onclick (GTE IE6, Firefox, Chrome) are executed ).

When the label is fully written, click input once and the input onclick (GTE IE6, Firefox, Chrome) will be executed ).

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.