How to prevent a link inside a label from triggering a checkbox?

前端 未结 8 1468
难免孤独
难免孤独 2021-01-03 18:41

I have this label:

8条回答
  •  花落未央
    2021-01-03 19:11

    Since multiple labels can point to the same checkbox, you can modify the text to consist of two labels (pointing to the checkbox) and the anchor text in the middle.

    
    
    terms
    

    Using the above technique, clicking on the link doesn't effect the state of the checkbox, yet all the remaining text does.

提交回复
热议问题