Some simple implementation codes of the form element take registration as an example

Some simple implementation codes of the form element take registration as an example

Code implementation:

Copy code
The code is as follows:

<!DOCTYPE html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<meta charset="utf-8">
<style type="text/css">
div{ width:35%;margin-left:32%;}
</style>
</head>
<body>
<div>
<form class="f1" action="http://www.baidu.com" method="get" >
<fieldset>
<legend>Registration form</legend>
<table width=100% >
<tbody>
<tr ><td class="left" width=40% align="right"><label for="t1">Name:</label></td>
<td class="right"><input type="text" id="t1" name="Name"></td>
</tr>
<tr><td class="left" width=40% align="right"><label for="Password1">Password:</label></td>
<td class="right"><input id="Password1" type="password" name="Password" /></td>
</tr>
<tr><td class="left" width=40% align="right"><label for="e1">E-mail:</label></td>
<td class="right"><input type="email" id="e1" name="youxiang" ></td>
</tr>
<tr><td class="left" width=40% align="right"><label for="1">Gender:</label></td>
<td class="right"><input type="radio" id="1" name="ssex" value="nan" />Male<!-- Just set the name to the same -->
<input type="radio" id="2" name="ssex" value="nv" />Female
</td>
</tr>
<tr><td class="left" width=40% align="right">Region:</td>
<td><select id="selc" name="place">
<option value="quanzhou">Quanzhou</option>
<option value="xiamen">Xiamen</option>
<option value="zhangzhou" >Zhangzhou</option>
</select>
</td>
</tr>
<tr><td class="left" width=40% align="right"><label for="txtarea">Introduction:</label></td>
<td><textarea id="txtarea"></textarea></td>
</tr>
<tr><td class="left" width=40% align="right">Interests:</td>
<td><input type="checkbox" id="cbox1" name="dushu" value="c1">Reading
<input type="checkbox" id="cbox2" name="yundong" value="c2">Sports
<input type="checkbox" id="cbox3"name="chihe" value="c3">Eat and drink
</td>
</tr>
<tr><td class="left" width=40% align="right">Upload:</td>
<td> <input type="file" id="f1" name="shangchuan" value="File1" /></td>
</tr>
<tr><td class="left" width=40% align="right" rowspan=2>
<input id="Submit1" type="submit" value="Submit" />
</td>
<td> <input id="Reset1" type="reset" value="Reset" />
</td>
</tr>
</tbody>
</table>
</fieldset>
</form>
</div>
</body>
</html>

Note that the function implemented by the code label is to make the mouse automatically focus on the text box when clicking the text!

Copy code
The code is as follows:

<label for="t1">Name:</label>

<<:  CSS uses calc() to obtain the current visible screen height

>>:  Explanation of the working principle and usage of redux

Recommend

A brief discussion on the principle of Vue's two-way event binding v-model

Table of contents explain: Summarize Replenish Un...

How to add a certificate to docker

1. Upgrade process: sudo apt-get update Problems ...

Analyzing Linux high-performance network IO and Reactor model

Table of contents 1. Introduction to basic concep...

CentOS 8 custom directory installation nginx (tutorial details)

1. Install tools and libraries # PCRE is a Perl l...

Detailed explanation of jQuery method attributes

Table of contents 1. Introduction to jQuery 2. jQ...

IE8 uses multi-compatibility mode to display web pages normally

IE8 will have multiple compatibility modes . IE pl...

How to deploy MongoDB container with Docker

Table of contents What is Docker deploy 1. Pull t...

MySQL scheduled database backup operation example

This article describes the example of MySQL sched...

Detailed explanation of the payment function code of the Vue project

1. Alipay method: Alipay method: Click Alipay to ...

A brief discussion on the implementation of fuzzy query using wildcards in MySQL

In the MySQL database, when we need fuzzy query, ...

How to implement mysql database backup in golang

background Navicat is the best MySQL visualizatio...

A detailed introduction to wget command in Linux

Table of contents First install wget View Help Ma...

Vue+Openlayer realizes the dragging and rotation deformation effect of graphics

Table of contents Preface Related Materials Achie...