zoukankan      html  css  js  c++  java
  • 如何让type="checkbox"不选中

    $(function(){
      $(".item_list").each(function(){
        var radio_this=$(this).children('ul').children('li').children('span');
        radio_this.find('input').click(function(){
        var radioId=$(this).attr('name');
        radio_this.find('span').removeAttr('class') && $(this).next().find('span').attr('class', 'check_i');
        $(this).parent('span').parent('li').siblings('li').find('input').removeAttr('checked') && $(this).attr('checked', 'checked');
        // console.log($('input[type="radio"]:checked').val())
      })
      })

    })

    .check_i {
       0.426667rem; 
      height: 0.426667rem;
      border-radius: 50%;
       position: absolute;
       top: 50%;
      margin-top: -0.213333rem;
         left: 50%;
       margin-left: -0.213333rem;
      background-image: url(../img/click_btn.png);
      background-size: 100% 100%;

     选中后改变背景图片即可

  • 相关阅读:
    c中%
    led,key通用IO的端口
    运行UART的程序
    大端和小段
    看门狗
    关于webpack的path和publicPath。
    转义BABEL的POLYFILL和RUNTIME的区别
    前端博客地址
    Webpack的使用指南-Webpack的常用解决方案
    webpack学习笔记
  • 原文地址:https://www.cnblogs.com/jvziking/p/7976397.html
Copyright © 2011-2022 走看看