zoukankan      html  css  js  c++  java
  • 在radio中绑定点击事件

    $(".checkss").bind("click", function (e) {
      $(e.target).closest("li").next().find(".checkpf").prop("checked", "checked");
     })

    注意一定要用prop否则使用attr时选择其它组内radio Attr中的checked无法去除

    <div style="display: table-cell;vertical-align: middle;">
                        <ul>
                                <li>
                                   <span><i class="fa fa-info-circle"></i>社:</span>
                                    <label class="normal"><input type="radio" name="35bae2d3-bc87-43c9-bd78-b11bf61e7362" id="3james" value="1" checked="checked">成功</label>
                                    <label class="normal"><input type="radio" name="35bae2d3-bc87-43c9-bd78-b11bf61e7362" id="3ww" value="0" class="checkss">失败</label>
                                </li>
                                <li>
                                    <span title="7%+7%"><i class="fa fa-info-circle"></i>金:</span>
                                    <label class="normal"><input type="radio" name="6748ed61-892c-4489-b2c9-69b8d290ae59" id="6james" value="1" checked="checked">成功</label>
                                    <label class="normal"><input type="radio" name="6748ed61-892c-4489-b2c9-69b8d290ae59" id="6ww" value="0" class="checkpf">失败</label>
                                </li>
                        </ul>
                    </div>
  • 相关阅读:
    chlick 在 blur 之后触发
    屏蔽运营商广告
    script标签清除缓存
    http-equiv 详解
    jqLite
    js 时间戳和转换-转载
    JS数组的常用方法
    js 前端实现文件流下载的几种方式
    解决兼容性的库
    移动端兼容性问题
  • 原文地址:https://www.cnblogs.com/firstcsharp/p/13896208.html
Copyright © 2011-2022 走看看