Use label tag to select the radio button by clicking the text

Use label tag to select the radio button by clicking the text
The <label> tag defines a label (tag) for an input element. The label element does not present any special effect to the user. However, it improves usability for mouse users. This control is triggered if you click on the text within the label element. That is, when the user selects the tag, the browser automatically shifts the focus to the form control associated with the tag. The for attribute of the <label> tag should be the same as the id attribute of the associated element

Example 1:

Copy code
The code is as follows:

<label for="man">
<input type="radio" value="男" name="man" id="man"/>
male
</label>
<label for="man2">
<input type="radio" value="女" name="man" id="man2"/>
female
</label>

Example 2:

Copy code
The code is as follows:

<input type="checkbox" name="Pages" value="Job" id="Job" ><label for="Job">Add and edit job information</label>

<input type="checkbox" name="Pages" value="JobQuery" id="JobQuery" &gt;<label for="JobQuery">Query and delete recruitment information</label>

<input type="checkbox" name="Pages" value="Technology" id="Technology" checked&gt;<label for="Technology">Add or modify technology items</label>

<<:  Sample code for using CSS to write a textured gradient background image

>>:  MYSQL METADATA LOCK (MDL LOCK) theory and lock type test

Recommend

Analysis of the Poor Performance Caused by Large Offset of LIMIT in MySQL Query

Preface We all know that MySQL query uses the sel...

In-depth understanding of Vue's data responsiveness

Table of contents 1. ES syntax getter and setter ...

Detailed explanation of the principle and function of Vue list rendering key

Table of contents The principle and function of l...

Two simple ways to remove text watermarks from web pages

<br /> When we browse certain websites and s...

Example code for using Nginx to implement 301 redirect to https root domain name

Based on SEO and security considerations, a 301 r...

Detailed Tutorial on Installing MySQL 5.7 on RedHat 6.5

RedHat6.5 installation MySQL5.7 tutorial sharing,...

JavaScript event loop case study

Event loop in js Because JavaScript is single-thr...

Vue: Detailed explanation of memory leaks

What is a memory leak? A memory leak means that a...

What are the advantages of using B+Tree as an index in MySQL?

Table of contents Why do databases need indexes? ...

JavaScript to achieve calendar effect

This article shares the specific code for JavaScr...

How to view and modify the time zone in MySQL

Today I found that a program inserted an incorrec...

Complete steps to achieve high availability with nginx combined with keepalived

Preface In order to meet the high availability of...

How to deploy nginx with Docker and modify the configuration file

Deploy nginx with docker, it's so simple Just...

FastDFS and Nginx integration to achieve code analysis

FastDFS & Nginx Integration: The tracker is c...