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

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

I have this label:

8条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-03 19:28

    Interactive elements inside interactive elements cause functional problems like this: it is undefined what happens when you click an a element inside a label element or vice versa. To avoid this, take the a element out of the label element, e.g.

     to the terms
    and would like to continue
    

    or

     to the
    terms and would like to continue
    

提交回复
热议问题