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>
  • 相关阅读:
    第一周。。。
    新人日报1129
    Daily Report-1126
    How to read source code[repost]
    Markdown tutorial [repost]
    蘑菇街面经
    阿里面经
    百度凤巢一二面经
    Mybatis最入门---代码自动生成(generatorConfig.xml配置)
    Maven的生命周期阶段
  • 原文地址:https://www.cnblogs.com/firstcsharp/p/13896208.html
Copyright © 2011-2022 走看看