Some simple implementation codes of form elements take registration as an example

Time:2020-2-26

 
Code implementation mode:

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 action=”http://www.baidu.com” method=”get” >
<fieldset >
Registration of < legend > forms < / legend >
<table width=100% >
<tbody>
< tr > < TD class = “left” width = 40% align = “right” ></td>
<td><input type=”text” name=”Name”></td>
</tr>
< tr > < TD class = “left” width = 40% align = “right” ></td>
<td><input type=”password” name=”Password” /></td>
</tr>
< tr > < TD class = “left” width = 40% align = “right” ></td>
<td><input type=”email” name=”youxiang” ></td>
</tr>
< tr > < TD class = “left” width = 40% align = “right” ></td>
<td>< input type = “radio” name = “ssex” value = “Nan” / > male <! — just set the same name — >
< input type = “radio” name = “ssex” value = “NV” / > female
</td>
</tr>
< tr > < TD class = “left” width = 40% align = “right” > region:</td>
<td><select 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” ></td>
<td><textarea></textarea></td>
</tr>
< tr > < TD class = “left” width = 40% align = “right” > interest:</td>
<td>< input type = “checkbox” name = “Dushu” value = “C1” > reading
< input type = “checkbox” name = “Yundong” value = “C2” > exercise
< input type = “checkbox” name = “Chihe” value = “C3” > eating and drinking
</td>
</tr>
< tr > < TD class = “left” width = 40% align = “right” > upload:</td>
<td> <input type=”file” name=”shangchuan” value=”File1″ /></td>
</tr>
<tr><td class=“left” width=40% align=”right” rowspan=2>
< input type = “submit” value = “submit” / >
</td>
<td>< input type = “reset” value = “reset” / >
</td>
</tr>
</tbody>
</table>
</fieldset>
</form>
</div>
</body>
</html>

Note that the function of 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 >

Recommended Today

What are the new methods of visual + map technology?

Last week, Ren Xiaofeng, chief scientist of Alibaba Gaode map, made a technical exchange with you on the development of computer vision related technology and the application in the field of map travel at the online live broadcast activity of “cloud dialogue” between senior students of Alibaba. The interaction between live broadcast is hot. Especially […]