You may not know how to use Label_Experience exchange

WBOY
Release: 2016-05-16 12:08:04
Original
1963 people have browsed it

The Label tag in HTML may be unfamiliar to those who have not been exposed to standards. Even if they are exposed to the standard, many people just use it as a container to interpret the elements in the form. I won’t go into the conceptual stuff here. If you are interested, you can refer to the tutorials on W3.

I just want to talk about the usage of For in Label. I have used it a few times on the Chinese website in the past two days, and it is quite fun. As in the example below, for "quite agree", try to click on the text to read. If you really feel "nit-picky", then please go and describe Little Braji's RedioBox.

Quite agree, I am really picky

The corresponding code above is as follows. In fact, it is not mysterious. It just adds a for attribute to the label, and the attribute value inside is the form element that needs to be associated. ID.


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh it before execution]

HOHO, in fact, this usage is already everywhere, Google, Baidu, MSN, as well as numerous C/S software...and have a wide range of applications, including multiple selections, single selections, and even links. Since it gives users a wider click area and does not require any additional code, why not?

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!