在form中有时候需要给单选框分组,这种情况下 可以通过给单选框设置相同的name来进行分组;
- <html>
- <head>
- <title> </title>
- </head>
- <meta charset="utf-8">
- <body>
- <form action="" method="">
-
- <input type="radio" name="sex"/>男
- <input type="radio" name="sex"/>女
-
- <input type="radio" name="subject"/>HTML
- <input type="radio" name="subject"/>CSS
-
- </form>
-
- </body>
- </html>
form中 单选框 input[type="radio"] 分组
原文:http://www.cnblogs.com/DreamSeeker/p/7807873.html