使用单选框、复选框,让用户选择2个<input name=" ">的name都写入“”gender-man“”一样也不行么?必须是gender?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>单选框、复选框</title>
</head>
<body>
<form action="save.php" method="post" >
<label>性别:</label>
<label>男</label>
<input type="radio" value="1" name="gender-man" />
<label>女</label>
<input type="radio" value="2" name="gender-man" />
</form>
</body>
</html>