zoukankan      html  css  js  c++  java
  • js勾选checkbox,按钮可按

    主要实现jquery方法,勾选checkbox后按钮变色并且除去disabled

     $(function () {
            $('.pricing-box').click(function () {
                $(this).addClass("select").siblings().removeClass("select");
            })
            $(".agree-choose input[type='checkbox']").change(function () {
    
                if ($(this).is(':checked')) {
                    $("#submit-btn").removeClass("disabled");
                } else {
                    $("#submit-btn").addClass("disabled");
                }
    
            })
        })
    <div class="agree-service-wrap">
                    <input type="checkbox" name="enableDiscount" class="price-factor hide">
                    <div class="agree-choose pull-right checkbox">
                        <label>
                            <input id="agree-choose" name="agree-choose" type="checkbox" class="ace">
                            <span class="lbl"> <span class="agree-use">我已阅读并同意签署</span><a href="" target="_blank">《服务协议》</a></span>
                        </label>
                    </div>
                </div>

    <footer class="order-price pull-right"><input type="hidden" name="costTotal" class="cost-total" value="0">
      <div class="price-total">
      <span class="price-label">总计:</span><span class="price">¥ 2490</span>
         <p>购买后店铺可容纳10个成员</p>
         <p> 到期时间为2018年5月22日</p>
       </div>
      <div class="order-submit"><a id="submit-btn" href="payment-order.html" type="button" class="btn btn-primary disabled btn-round">提交订单</a></div>
    </footer>
  • 相关阅读:
    MySQL数据库优化【笔记】_索引的创建和删除(ALTER TABLE方式)
    [C#基础知识]泛型Dictionary<string,string>的用法详解
    权重衰退
    softmax回归
    交叉熵损失函数
    线性回归
    极大似然估计
    【SpringBoot-消息 02】
    【SpringBoot-cache 01】
    【JavaWeb 实际项目_Cookie&Session 06】
  • 原文地址:https://www.cnblogs.com/silences/p/7154980.html
Copyright © 2011-2022 走看看