表单进阶
单选框
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>您对于我们的满意度如何</div>
<div>
<input type="radio" name="a1" value="" checked="checked">非常满意 <br>
<input type="radio" name="a1" value="">一般 <br>
<input type="radio" name="a1" value="">不满意
</div>
<div>您的性别</div>
<div>
<input type="radio" name="sex" id="man" checked="checked"><label for="man">man</label> <br>
<input type="radio" name="sex" id="woman"><label for="woman">woman</label>
</div>
</body>
</html>
复选框
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>您的兴趣爱好</div>
<div>
<input type="checkbox" name="interest">抽烟 <br>
<input type="checkbox" name="interest" checked="checked">喝酒 <br>
<input type="checkbox" name="interest">烫头 <br>
<input type="checkbox" name="interest">泡妞 <br>
</div>
<div>您的擅长技术</div>
<div>
<input type="checkbox" name="goodAt" checked="checked">python <br>
<input type="checkbox" name="goodAt" checked="checked">C <br>
<input type="checkbox" name="goodAt">django <br>
<input type="checkbox" name="goodAt">spider <br>
<input type="checkbox" name="goodAt">html <br>
<input type="checkbox" name="goodAt">css <br>
<input type="checkbox" name="goodAt">js <br>
<input type="checkbox" name="goodAt" disabled="disabled">vue <br>
</div>
</body>
</html>
上传文件
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>请截图说明</div>
<div>
<input type="file" name="file" value="">
</div>
</div>
<div>图片按钮</div>
<div>
<input type="image" src="1.png">
</div>
</div>
<div>隐藏按钮</div>
<div>
<input type="hidden" src="1.png" value="">
</div>
</div>
</body>
</html>
下拉菜单
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>选择您的收货地址</div>
<select name="provice" id="provice" size="1">
<option value="ln">河北省</option>
<option value="hn" selected="selected">河南省</option>
<option value="sd">山东省</option>
<option value="sx">山西省</option>
</select>
</body>
</html>
文本域
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
textarea{
width: 300px;
height: 200px;
resize:vertical;
}
</style>
</head>
<body>
<div>您的意见就是我们改进的动力</div>
<div>
<textarea name="" id="" cols="30" rows="10" placeholder="请输入您的意见"></textarea>
</div>
</body>
</html>
字段集
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
fieldset{
width: 200px;
border:1px solid tomato;
background-color: wheat;
}
</style>
</head>
<body>
<fieldset>
<legend>个人信息</legend>
<fieldset>
<legend>性别</legend>
<input type="radio" name="sex"> 男
<input type="radio" name="sex"> 女
</fieldset>
<fieldset>
<legend>爱好</legend>
<input type="radio" name="sex"> 抽烟
<input type="radio" name="sex"> 喝酒
<input type="radio" name="sex"> 烫头
</fieldset>
</fieldset>
</body>
</html>