FireBug Firefox3.5.2中出现以下错误
Failed to load source for: http://example.com/
我的书签
javascript:(
function(){
window.callback = function(d){alert(d)};
var script = document.createElement('script');
script.setAttribute("type", "text/javascript");
script.setAttribute("charset", "UTF-8");
script.setAttribute("id", (new Date()).getTime());
script.src="http://example.com/api/function.php?callback=window.callback";
document.body.appendChild(script);
}
)();
回调是:
window.cb && window.cb({"key":"value"});
怎么了?
答案 0 :(得分:0)
如果您真的从PHP页面加载,我会确保该页面返回text/javascript
MIME类型。