1

索引.html

<html>
    <head>
    <script type="text/javascript" src="/js/jcors-loader.js"></script>
    <script>
        JcorsLoader.load(
                "js/jquery-1.8.0.js",
                "/js/alertme.js",
                function() {
                    $("#result").text("TEST OK");
                }
        );

    </script>
    </head>
    <body>
    <h1 id="result"></h1>
    </body>
    </html>

alertme.js

alert("Loaded");

这在 chrome 和 firefox 中运行良好,它显示“TEST OK”并弹出...但在 IE(7,8,9) 中没有消息或警报...任何帮助将不胜感激。

4

2 回答 2

1

I wrote that library, remember these three tips to use it.

  • Not invoke a script add the inline content.
  • Put the script tag after the .
  • IE7 works but blocks onload.
于 2013-12-21T22:06:05.847 回答
0

首先要检查的是您没有console.log在 javascript 中使用任何地方,因为这可能会导致 IE 出现有趣的问题。

接下来要做的是检查您正在使用的库上的文档,因为它可能与 IE 9 及以下版本不兼容(您是否尝试过使用 IE 10?)

于 2013-09-13T08:13:11.293 回答