53 lines
1.8 KiB
HTML
53 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>HTML-表单项标签</title>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- value: 表单项提交的值 -->
|
|
<form action="/save" method="post">
|
|
姓名: <input type="text" name="name"> <br><br>
|
|
|
|
密码: <input type="password" name="password"> <br><br>
|
|
|
|
<!-- label: 表单标签, 描述表单项的含义 -->
|
|
性别: <input type="radio" name="gender" value="1"> 男
|
|
<label><input type="radio" name="gender" value="2"> 女 </label> <br><br>
|
|
|
|
爱好: <label><input type="checkbox" name="hobby" value="java"> java </label>
|
|
<label><input type="checkbox" name="hobby" value="game"> game </label>
|
|
<label><input type="checkbox" name="hobby" value="sing"> sing </label> <br><br>
|
|
|
|
图像: <input type="file" name="image"> <br><br>
|
|
|
|
生日: <input type="date" name="birthday"> <br><br>
|
|
|
|
时间: <input type="time" name="time"> <br><br>
|
|
|
|
日期时间: <input type="datetime-local" name="datetime"> <br><br>
|
|
|
|
学历: <select name="degree">
|
|
<option value="">----------- 请选择 -----------</option>
|
|
<option value="1">大专</option>
|
|
<option value="2">本科</option>
|
|
<option value="3">硕士</option>
|
|
<option value="4">博士</option>
|
|
</select> <br><br>
|
|
|
|
描述: <textarea name="description" cols="30" rows="10"></textarea> <br><br>
|
|
|
|
<input type="hidden" name="id" value="1">
|
|
|
|
<!-- 表单常见按钮 -->
|
|
<input type="button" value="按钮">
|
|
<input type="reset" value="重置">
|
|
<input type="submit" value="提交">
|
|
<br>
|
|
</form>
|
|
|
|
</body>
|
|
</html> |