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>
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM