jquery判断radio是否选中

 
<div class="system">
      <div class="systemt">
        <label for="truepan">
        <input type="radio" name="weixitong"  id="truepan" class="systemChose" / >
        <span>微交易-实体系统</span>
         </label>
      </div>
         
         <div class="systemx" style="">
             <label for="xunipan">
              <input type="radio" name="weixitong" id="xunipan" class="systemChose" / >
              <span>微交易-虚拟系统</span>
              </label>
         </div>  
   </div>



<script>
  $(".systemChose").click(function(event{
  /* Act on the event */
   if($(this).is(":checked")){  
      $(".system").find('span').css({
        background'#fff',
        color'#999'
      });
      $(this).parent().find('span').css({
        background'red',
        color'#fff'
      });
    }
  });

</script>
 
posted @ 2016-11-07 17:56  墨纸瀚云  阅读(14738)  评论(0编辑  收藏  举报