<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");
}
});
Note: Some framework optimized for input do style, did not respond when clicked, to see whether to hide the real input.
Reference links:
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