IE7 仅运行内联脚本...并且似乎不包含 src 脚本

发布于 2024-12-13 19:58:57 字数 97 浏览 3 评论 0原文

我的网站可以在 Chrome、Firefox 和 IE8 上运行。但到了IE7就不行了。 只有内联脚本可以工作,而包含的脚本则不能。

造成问题的原因是什么?谢谢你!

my website is working in chrome, firefox and IE8. But when it comes to IE7 it doesnt work.
Only the inline scripts are working, and the included ones, are not.

what cause the problem? thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

明媚殇 2024-12-20 19:58:57

我尝试了以下代码:

    <html>
    <head>
        <script src="http://www.domain.com/scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(document).ready(function()
            {
                alert("It works");
            });
        </script>
    </head>
    <body></body>
</html>

它确实有效。有几个原因可能会导致您的问题:

  • URL 中的空格
  • 浏览器中的一些安全选项
  • 您网络中的一些安全选项(内容拦截器)。您是否尝试过直接加载 javascript 文件(将 URL 粘贴到地址栏中)?
  • ETC。

I tried following code:

    <html>
    <head>
        <script src="http://www.domain.com/scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
        <script type="text/javascript">
            $(document).ready(function()
            {
                alert("It works");
            });
        </script>
    </head>
    <body></body>
</html>

and it did work. A couple of reasons can be responsible for your problem:

  • The spaces in your URL
  • Some security options from your browser
  • Some security options from your network (content blocker). Have you tried to load the javascript file directly (paste the URL into adressbar)?
  • etc.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文