孙熊爱小闹
2016-10-16 23:47
这样?
你对什么运动感兴趣
慢跑
登山
篮球
<form>
<label for="male">男</label>
<input type="radio" name="gender" id="male" />
<br />
<label for="female">女</label>
<input type="radio" name="gender" id="female" />
<br />
<label for="email">输入你的邮箱地址</label>
<input type="email" id="email" placeholder="Enter email">
<br/>
你对什么运动感兴趣<br/>
慢跑<input type="checkbox" name="checkbox1" vaule="慢跑"><br/>
登山<input type="checkbox" name="checkbox2" value="登山"><br/>
篮球<input type="checkbox" name="checkbox3" value="篮球">
</form>
用label for关联
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>form中的lable标签</title>
</head>
<body>
<form>
<div>你对什么感兴趣:</div>
<label for="one">慢跑</label>
<input type="checked" name="sport" id="one" />
<br />
<label for="two">登山</label>
<input type="checked" name="sport" id="two" />
<br />
<lable for="three">篮球</lable>
<input type="checked" name="sport" id="three">
<br />
<label for="email">输入你的邮箱地址</label>
<input type="email" id="email" placeholder="Enter email">
</form>
</body>
</html>
<input type="checkbox" name="sport" id="one">吧 name应该改一下
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>form中的lable标签</title>
</head>
<body>
<form>
<div>你对什么运动感兴趣:</div>
<label for="one">慢跑</label>
<input type="checkbox" name="gender" id="one">
<br>
<label for="two">登山</label>
<input type="checkbox" name="gender" id="two">
<br>
<ladel for="three">篮球</ladel>
<input type="checkbox" name="gender" id="three">
</form>
</body>
</html>
是的吧
初识HTML(5)+CSS(3)-升级版
1225808 学习 · 18234 问题
相似问题