<input type="radio" >控件取值、change事件

<input type="radio" class="ridio-box" checked=""  value="0" name="monitorType">  A
<input type="radio" class="ridio-box" value="1" name="monitorType"> B

  

$('input[type=radio][name=monitorType]').change(function() {
        var monitorType=$("input[type='radio'][name='monitorType']:checked").val();
        if(monitorType==0){
           //aaaa
        }
        else{
           //bbbb
        }
    });

  




posted on 2020-11-04 14:41  七七2020  阅读(1639)  评论(2编辑  收藏  举报

导航