You don't necessarily know. For usage of the label _ Experience Exchange
Source: Internet
Author: User
The label label in the HTML, the non-contact standard is afraid to be more unfamiliar. Even when exposed to the standard, many people just use it as a container to explain the elements in the form. The concept of things I do not here, I am interested to see the W3 on the tutorial.
Here I just want to talk about the use of the label in for, these two days to engage in Chinese station with a few, or relatively cool. As the following example, for "quite agree", try to point the text to see. If you really feel "picky", then trouble to trace the little rediobox.
Quite agreeable, indeed fastidious.
The corresponding code below, in fact quite not mysterious, just add a for property on the label, the property value is the required table cell ID.
<textarea id="runcode86106"><input type= "Radio" name= "RadioButton" value= "RadioButton" id= "RadioButton"/> <label for= "RadioButton" > Quite agree </label> <input type= "Radio" name= "RadioButton" value= "RadioButton"/> Really picky: <label onclick= " window.location = ' http://www.douneed.com ' >Douneed</label></textarea>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
HOHO, in fact, this usage has been everywhere, Google, Baidu, MSN, there are more than n c/s software ... and the scope of application is very wide, multi-Select, single, or even link. If you give the user a wider area of the click, do not need any additional code, and why not?
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