Click the radio button to select and implement cancel (the difference between the prop and attr)

Here Insert Picture Description

radioclick() {

                $('.radio1').prop('checked',true)    √√√√√√√
                $('.radio2').prop('checked',false)   √√√√√√√  
                当要改变其状态时,如果是自带的状态要用prop,不然,不然你自己试试就知道了
                	

				//  $(".radio1").attr("checked","checked")     ××××××
				//  $(".radio2").removeAttr("checked");     ××××××××××
                
            },

Guess you like

Origin blog.csdn.net/weixin_43565820/article/details/90177060