代码之家  ›  专栏  ›  技术社区  ›  Hogan

IE 6和jQuery 1.3.2不起作用(带代码)

  •  2
  • Hogan  · 技术社区  · 16 年前

    在IE6中,我只看到了第一个警报框,它将呈现页面,但js文件中似乎有某种东西导致IE6停止处理页面中的脚本 <head> 内容,因此不显示第二个警报框。Chrome按预期工作。

    不用说,这是一个复杂得多的问题,但我已经设法将其简化为:IE6似乎“失败”,并停止了对javascript的处理 < 加载1.3.2 javascript文件后的区域。

    有什么想法吗?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html >
    <head>
      <title>test</title>
      <link rel="Stylesheet" href="main.css" />
      <script type="text/javascript">
        alert("here 1");
      </script>
      <script src="jquery-1.3.2.js" type="text/javascript" />
      <script type="text/javascript">
        alert("here 2");
      </script>
    </head>
    <body>
    nothing to see here... move along...
    
    </body>
    </html>
    
    2 回复  |  直到 16 年前
        1
  •  4
  •   mattbasta    16 年前

    根据我的记忆,如果没有脚本的结束标记,就无法加载JS文件:

    <script src="jquery-1.3.2.js" type="text/javascript"></script>
    

    试试看,如果成功了就告诉我!

        2
  •  1
  •   rjlopes    16 年前

    不能

    使用:

    <script src="jquery-1.3.2.js" type="text/javascript"></script>