js元素状态切换
1 $(document).on(‘change‘,‘#c-is_grade‘,function () { 2 if($(this).val()==0){ 3 $(‘#c-total_score‘).parents(‘.form-group‘).hide(); 4 $(‘.score_box‘).hide(); 5 }else if($(this).val()==1){//评分 6 $(‘#c-total_score‘).parents(‘.form-group‘).show(); 7 $(‘.score_box‘).show(); 8 } 9 }); 10 11 $(document).on(‘change‘,‘#c-is_scan‘,function () { 12 if($(this).val()==0){ //否 13 $(‘#c-scan_num‘).parents(‘.form-group‘).hide(); 14 }else if($(this).val()==1){ 15 $(‘#c-scan_num‘).parents(‘.form-group‘).show(); 16 } 17 });
js元素状态切换
,温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/40228.html