代码如下:
<html>
<head>
<script type="text/javascript" src="jquery-1.4.js"></script>
<script type="text/javascript">
$(document).ready(function(){
alert("hello");
});
</script>
</head><body>
<h1>hello</h1>
</body>
</html>
然后firebug报的错误是两个
missing ) after argument list
http://localhost/test/js/jquery-1.4.js
Line 6064$ is not defined
http://localhost/test/test.html
Line 8我要崩溃了  谁来救救我啊

解决方案 »

  1.   

    <script type="text/javascript"> 
    Jquery(document).ready(function(){ 
    alert("hello"); 
    }); 
    </script> 
    这样呢?
      

  2.   

    文件编码方式的问题吧,
    统一改为utf-8
      

  3.   

    <script type="text/javascript"> 
    jQuery(document).ready(function(){ 
    alert("hello"); 
    }); 
    </script>
    这样j小写Q大写
      

  4.   


    <html>
    <head>
    <script type="text/javascript" src="http://images.5173cdn.com/5173/js/jquery-1.3.2.min.js"> </script>
    <script type="text/javascript">
    $(document).ready(function(){
    alert("hello");
    });
    </script>
    </head><body>
    <h1>hello </h1>
    </body>
    </html> 
    没有任何问题,估计你js框架里的问题
      

  5.   

    单纯的一个页面也这样 没用框架什么的东西
    我觉得好像是不是JS的问题 好像是Apache跟这个那里起冲突什么的了 
      

  6.   

    改过后 第2个错误变成这样的了
    jQuery is not defined
    http://localhost/test/test.html
    Line 8
      

  7.   

    换一下 你的jquery-1.4.js版本吧 用1.3.2试试
      

  8.   

    感觉是这样的 在单独的页面里  单纯的用浏览器打开文件 不会出问题 但是放在apache下就会出错误  jquery是刚在官网上下载的 1.3.2是报
    missing ; after argument list
    http://localhost/test/js/jquery.js
    Line 2704
    这样的错误 总之我觉得不是jquery的问题 因为只有放在apache下才会出问题  然后我用同事的机器上测试 代码也没问题  jquery也没问题  我知道不应该发在这里 但是发在apache那边 没人理我 
      

  9.   

    吧jquery的所有代码直接复制到HTML页面上 在调试看看
    就能确认问题了
      

  10.   

    拷进来了  直接打开html页面有用  放到apache下什么都不显示了  空白的  也不报错误  更痛苦了
      

  11.   

    不好意思 APACHE不太熟  不过基本可以锁定在APACHE身上了