我使用的是從Facebook的JavaScript SDK,我只是做了什麼樣的例子說加載它。這是示例代碼。不能加載jquery
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '{{ facebook_app_id }}', status: true, cookie: true,
xfbml: true});
FB.Event.subscribe('{% if current_user %}auth.logout{% else %}auth.login{% endif %}', function(response) {
window.location.reload();
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="FetchPic.js"></script>
</body>
但問題是從Facebook的all.js可以成功地加載,但既不是jQuery的,也不FecthPic可以加載,它只是不斷地說找不到404。但它們都與html文件位於同一目錄中。我不知道爲什麼。謝謝
你可以使用瀏覽器的URL欄加載'jquery.js'嗎?爲什麼不[使用CDN的jQuery](http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery),無論如何? – 2011-04-27 02:45:47
如果您將頁面的地址放入瀏覽器並將頁面名稱替換爲腳本名稱,會發生什麼情況? – 2011-04-27 02:46:48
我的螢火蟲說404沒有找到,我輸入的網址欄中的網址後,它是空白的,沒有結果。謝謝 – 2011-04-27 02:48:22