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" ><label for="JobQuery">Query and delete recruitment information</label> <input type="checkbox" name="Pages" value="Technology" id="Technology" checked><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
I received a task from the company today, and the...
CSS to achieve the image hovering mouse folding e...
Preface Docker has been very popular in the past ...
Recently, when I was learning jQuery, I came acro...
Source code (some classes deleted): Copy code The ...
Preface Forgotten passwords are a problem we ofte...
Table of contents 1 Introduction to user variable...
Compared with FTP, SSH-based sftp service has bet...
MySQL replace and replace into are both frequentl...
1. Use of Iframe tag <br />When it comes to ...
1 Problem Description This article sorts the esta...
Timer Effects: <div> <font id='timeC...
1. Components and implemented functions Keepalive...
Table of contents Preface 1. Array traversal meth...
This article shares the specific code of react to...