HTML——74. 表单实战
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>表单实战</title>
</head>
<body>
<form action="" method="post">
姓名*:<input type="text" name="user" required/>
<br />
<br />
密码*:<input type="password" name="pwd" required/>
<br />
<br />
性别*:<input type="radio" name="sex" value="1" required/>男
<input type="radio" name="sex" value="0" required/>女
<br />
<br />
年龄*:<input type="number" name="age" min="0" max="100" required/>
<br />
<br />
课程*:<input type="checkbox" name="kc[]" value="k1"/>课程1
<input type="checkbox" name="kc[]" value="k2"/>课程2
<input type="checkbox" name="kc[]" value="k3"/>课程3
<br />
<br />
手机*:<input type="text" name="tel" pattern="[0-9]{11}" required/>
<br />
<br />
城市*:<select name="city1" required>
<option value="bj">北京</option>
<option value="sh">上海</option>
</select>
<select name="city2" >
<option value="xx">XX区</option>
<option value="yy">YY区</option>
</select>
<br />
<br />
住址:<input type="text" name="add"/>
<br />
<br />
备注:<textarea name="bz" style="width: 200px;height: 80px;">请输入...</textarea>
<br />
<br />
<input type="submit"/><input type="reset" />
</form>
</body>
</html>
实战内容