【问题标题】:jquery code shows permission denied with IE Edge & Iframesjquery 代码显示权限被 IE Edge 和 iframe 拒绝
【发布时间】:2015-11-18 23:01:02
【问题描述】:

大多数 jquery 代码会因 IE Edge 和 Iframe 而中断

访问元素时显示权限被拒绝

需要使用 getElementById 和 getElementsByTagName 转移到旧版 javascript 代码库。这很好用,但不可能更改应用程序的整个代码库,这是一个巨大的代码库。

任何建议或有人知道任何插件来匹配。

【问题讨论】:

    标签: javascript jquery internet-explorer iframe microsoft-edge


    【解决方案1】:

    让我分享一下我发现的替代方案/或者可能是解决问题的方法。

    $.extend($.expr[':'],{
        inline: function(a) {
            return $(a).css('display') === 'inline';
        }
    });
    

    使用上面代码这样的小块,我们可以扩展功能或修复其中的一些错误。

    参考:$.extend

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-08-07
      • 2012-11-12
      • 1970-01-01
      • 2011-06-13
      • 2016-09-24
      • 2021-04-13
      • 2011-02-26
      • 2012-06-28
      相关资源
      最近更新 更多