后台json数据
{
"Nr": "1",
"interval": "每天",
"item": "检查",
"itemDesc": "机台是否正常使用",
"itemResult": "正常使用/停机",
"itemValue": "停机"
}
html
//显示与隐藏
var isPermanentValue = $('input[name="1"]:checked ').val();
if(isPermanentValue == "停机") {
$("#listcont").hide();
}
if(isPermanentValue == "正常使用") {
$("#listcont").show();
}
$(".ditem").click(function() {
var isPermanentValue = $('input[name="1"]:checked ').val();
if(isPermanentValue == "停机") {
$("#listcont").hide();
}
if(isPermanentValue == "正常使用") {
$("#listcont").show();
}
})
效果图
原文链接https://blog.csdn.net/qq_36092584/article/details/52740681