<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
body {
background: url(images/bg.jpg) no-repeat;
padding: 0;
margin: 0;
width: 1003px;
height: 1056px;
}
#apDiv1 {
position: absolute;
width: 225px;
height: 18px;
z-index: 1;
left: 182px;
top: 239px;
}
</style>
</head>
<body>
<div id="apDiv1">
<form id="form1" name="form1" method="post" action="">
<input type="radio" name="radio" id="radio" value="radio">
<label for="radio">男</label>
<input type="radio" name="radio2" id="radio2" value="radio2">
<label for="radio2">女</label>
</form>
</div>
</body>
</html>
input的name定义一样的时候,就会成立一个单选框组,提交表单的时候,服务端就会接收你选中的单选框
网友评论