首页 > Web开发 > 详细

html 的radio单选框如何实现互斥------radio只是input的type属性

时间:2018-11-17 12:42:37      阅读:170      评论:0      收藏:0      [点我收藏+]

  先看看没有互斥的情况:

  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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!