stop label from toggling the input checkbox

后端 未结 5 1427
生来不讨喜
生来不讨喜 2021-01-17 09:34

I have the following html code. When clicking on the label it toggles the checkbox.

5条回答
  •  耶瑟儿~
    2021-01-17 10:31

    if you are using JQuery, add an id on your label then add this in your script:

    $("#lbl").click(function(){
       return false; 
    });
    

提交回复
热议问题