<input type="radio" value="1" checked="" name="purifyse">安装
<input type="radio" value="0" name="purifyse" >未安装

//改变
$(':radio').click(function(){
var showFlag = $('input:radio[name="purifyse"]:checked').val();
if(showFlag==1){
$("#purifyBox").removeClass("hide");
}
else {
$("#purifyBox").addClass("hide");
}
});

注:有些框架中对于input做了样式优化,点击时没有反应,查看是否隐藏真正的input。
参考链接:
cnblogs.com/z360519549/p/10628269.html
https://blog.csdn.net/aphy358/article/details/50250069?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task
https://blog.csdn.net/weixin_34185320/article/details/93572430

相关文章:

  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
  • 2022-01-12
  • 2022-01-16
  • 2022-01-15
猜你喜欢
  • 2021-12-24
  • 2022-02-23
  • 2022-12-23
  • 2022-02-23
  • 2021-05-20
  • 2021-08-18
  • 2021-12-06
相关资源
相似解决方案