<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>表单提交学习登录注册</title>
</head>
<body>
<form action="图像标签.html" method="get">
<p>名字: <input type="text" name="username"value="超旺好帅"maxlength="8"size="30"></p>
<p>密码: <input type="password" name="pwd"></p>
<p>性别:
<input type="radio"value="boy"name="sex"/>男
<input type="radio"value="girl"name="sex"/>女
</p>
<p> <input type="submit">
<input type="reset">
</p>
</form>
</body>
</html>
实际样式
get时可以看到账号密码还有单选框的选项的value的值
通过name一样的值来认定男和女在一组之中,所以可以实现只能在二者之中选择一个。