Toggle HTML radio button by clicking its label

前端 未结 4 1034
攒了一身酷
攒了一身酷 2020-12-13 01:32

Is there please a simple way to make a radio button toggle - when a text near it is clicked - without introducing any big Javascript Framework into my smal PHP project?

4条回答
  •  悲&欢浪女
    2020-12-13 01:47

    You can also wrap your elements without giving them each an ID, since a is implicitly for the input it contains, like this:

    
    

提交回复
热议问题