Article From:https://www.cnblogs.com/coder-lzh/p/9060593.html

Scene 1: click checkbox. All other checkbox are selected to be cancelled (meaning only checkbox can be selected).

function fn(obj,event){      //objThis is the object of this, event is the event object of windows, and the method parameter must be onclick=fn (this, event) when referring to the reference.Event.stopPropagatiOn ();//Canceling the bubble event
    $("#myTable input[name='danjia']").not(obj).attr("checked", false);
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *