label與radio合並


寫法一

< input  type = "radio"  id = "radioA"  name = "radio1"  />< label  for = "radioA" >這是radioA</ label >
< input  type = "radio"  id = "radioB"  name = "radio1"  />< label  for = "radioB" >這是radioB</ label >  
 
label for將label與radio關聯到一起,點擊label與點擊radio效果一樣

  寫法二:

< label >< input  type = "radio"   name = "radio2" >這是radioA</ label >
< label >< input  type = "radio"   name = "radio2" >這是radioB</ label >
 
label與radio合並,顯示出來的是一個label樣式的radio


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM