先看看没有互斥的情况:
?1 <html> ?2 <body> ?3 ??4 男性:<input type="radio" id="male" /> ?5 <br /> ?6 女性:<input type="radio" id="female" /> ?7 <br /> ?8 ??9 </body> 10 </html> 11
要实现互斥, 可以让名称一致, 比如:
?1 <html> ?2 <body> ?3 ??4 男性:<input type="radio" id="male" ?name="xxx"/> ?5 <br /> ?6 女性:<input type="radio" id="female" name="xxx"/> ?7 <br /> ?8 ??9 </body> 10 </html> 11
html 的radio单选框如何实现互斥------radio只是input的type属性
原文地址:https://www.cnblogs.com/ago-0912/p/9973338.html