【问题标题】:pointer-events: none; doesn't work in IE [duplicate]指针事件:无;在 IE 中不起作用 [重复]
【发布时间】:2018-02-09 16:49:01
【问题描述】:
pointer-events: none; 

这在 IE 中不起作用,但在 Chrome 中起作用,我需要在 IE 中禁用复选框,有没有办法从 CSS 中禁用复选框?

【问题讨论】:

    标签: css


    【解决方案1】:

    用js试试

        $(window).load(function() {
          $('.wrapper input[type="checkbox"]').attr('disabled', true);
        });
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <div class="wrapper"><label>disabled input <input type="checkbox"></label></div>

    【讨论】:

    • 我的复选框是动态生成的,而不是从前端生成的,因此 chckboxes 没有 id 或类。因此,我想通过 CSS 实现它
    • ok) $(window).load(function() { $('你的父类名 input[type="checkbox"]').attr('disabled', true); }) ;
    猜你喜欢
    • 1970-01-01
    • 2014-09-24
    • 2013-06-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-19
    相关资源
    最近更新 更多