码迷,mamicode.com
首页 > Web开发 > 详细

js元素状态切换

时间:2019-12-16 13:15:48      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:core   for   ide   pre   parent   change   function   func   hang   

 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元素状态切换

标签:core   for   ide   pre   parent   change   function   func   hang   

原文地址:https://www.cnblogs.com/codeninja/p/12048298.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!