responsed.min.js,第5行字符746,访问被拒绝,在IE8中

respond.min.js, line 5 character 746, access is denied , in IE8?

本文关键字:拒绝 访问 IE8 字符 js min 5行 responsed      更新时间:2023-09-26

实际上,我正在使用bootstrap3在IE8中测试我的站点。我用了这几行代码。

  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>

当我调试代码时,IE8反映了c.open("GET",a,!0)处的错误,我该如何解决它,问题是什么????

使用bootstrap和IE8时,必须从服务器上运行html,以避免@jevgenig所述的安全问题。在本地测试时,可以使用localhost作为替代。

我还建议将这些脚本包装在你的标题中IE特定的注释中。

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

要运行responsd.js,您需要一个localhost。这将解决你的问题。