请问一下性别那里的单选按钮怎么设置只能选择一个的选项?我在网页里预览的时候勾选了“男”以后再点“女”就会把两个按钮都选中
以下是代码部分
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>8.3表单作业</title>
<style type="text/css">
body {
background-image: url(images/83-1.jpg);
background-repeat: no-repeat;
color: #000000;
font-family: 微软雅黑;
font-size: 12px;
line-height: 25px;
}
#top {
width: 100%;
height: 30px;
margin-top: 70px;
margin-bottom: 10px;
text-align: center;
font-size: 18px;
line-height: 30px;
font-weight: bold;
color: #FFFFFF;
background-color: #DDAA00;
}
#reg {
width: 600px;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 10px;
height: auto;
border: 1px solid #FDFDFD;
background-color: rgba(255,255,255,0.30);
}
#reg li {
height: 35px;
line-height: 40px;
list-style-type: none;
border-bottom: 1px dashed rgba(255,255,255,1.00);
}
#btn {
text-align: center;
top: 10px;
}
#yhm, #mm, #qrmm, #zj, #zjhm, #dzyx, #yzm {
border: 1px solid rgba(0,0,0,1.00);
background-color: rgba(255,255,255,0.00);
border-radius: 5px;
}
</style>
</head>
<body>
<div id="top">新用户注册</div>
<div id="reg">
<li>用 户 名
<label for="yhm">:</label>
<input name="yhm" type="text" id="yhm" title="英文字母和数字组合,字符长度为4-20">
英文字母和数字组合,长度4-20个字符</li>
<li>
<label for="mm">密 码:</label>
<input type="password" name="mm" id="mm">
长度6-20个字符,可以有英文字母和数字组成,不得使用空格</li>
<li>
<label for="qrmm">确认密码:</label>
<input type="password" name="qrmm" id="qrmm">
再次输入用户密码</li>
<li>
<label for="zj">证件类别:</label>
<select name="zj" id="zj">
<option selected>身份证</option>
<option>学生证</option>
<option>护照</option>
<option>军人证</option>
<option>其他证件</option>
</select>
</li>
<li>
<label for="zjhm">证件号码:</label>
<input type="text" name="zjhm" id="zjhm">
证件号码用于密码查询,请如实填写</li>
<li>
<label for="dzyx">电子邮箱:</label>
<input type="email" name="dzyx" id="dzyx">
用于接收各种信息,以及找回密码服务</li>
<li>
性 别:
<input name="radio" type="radio" id="radio" value="radiobutton1" checked>
<label for="radio">男 </label>
<input type="radio" name="radio2" id="radio2" value="radiobutton2">
<label for="radio2">女</label>
</li>
<li>验 证 码
<label for="yzm">:</label>
<input type="text" name="yzm" id="yzm">
</li>
<div id="btn">
<input type="image" name="imageField" id="imageField" src="images/83-2.png">
</div>
</div>
</body>
</html>
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|
 点赞26 哪些同学觉得很赞!
lori棒棒糖 觉得很赞
昵昵妹 觉得很赞
潜意式 觉得很赞
龙猫1212 觉得很赞
大大大表哥 觉得很赞
依仔101 觉得很赞
西卡 觉得很赞
一品数码 觉得很赞
热爱生活热爱家 觉得很赞
我叫大帅比 觉得很赞
|
|
|