$("input:radio").click(function(){
var domName = $(this).attr('name');//获取当前单选框控件name 属性值
var checkedState = $(this).attr('checked');//记录当前选中状态
$("input:radio[name='" + domName + "']").attr('checked',false);//1.
$(this).attr('checked',true);//2.
if(checkedState == 'checked'){
$(this).attr('checked',false); //3.
}
});

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2021-12-02
  • 2021-04-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
  • 2021-11-14
  • 2021-08-15
相关资源
相似解决方案