Click a div to check / uncheck a checkbox

前端 未结 5 692
执念已碎
执念已碎 2020-12-11 19:13

I applied the following code to make table rows check/uncheck a child checkbox when clicked. Now I discovered that when clicking the checkbox itself inside the row it doesen

5条回答
  •  悲哀的现实
    2020-12-11 19:50

    What about:

    return false;
    

    As it is the same as entering both:

    e.preventDefault(); 
    e.stopPropagation();
    

    I believe that is the go to - no?

提交回复
热议问题