非CDN托管的jQuery引起了一些奇怪的行为

时间:2010-06-05 14:41:55

标签: jquery

我在此下载链接中使用了JQuery,并将其包含在HTML网页的head标记中:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>

在php网页中,我得到了以下几行代码:

 $.ajax({
      url: 'http://mywebsite.com/site1/toavail/',
      type: "post",
      success: function(data) { 
      // some more code here
      }
   });

当我在IE 6和7中测试HTML页面时,我看到了相同的警告消息: “没有权限” 当我在Firefox 3中测试它时,没有从服务器网页返回任何内容。

后来,我将JQuery源链接更改为:

http://code.jquery.com/jquery-1.4.2.js

我刷新了网页,然后我可以看到返回的值。

1 个答案:

答案 0 :(得分:2)

如果查看http://code.jquery.com/jquery-latest.js,它只是返回jQuery 1.4.2。也许之前有一个小故障?我不知道它会如何导致任何问题,否则。