0
出現下列錯誤在Firebug Firefox3.5.2JavaScript錯誤與JSONP發生在書籤
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"});
有什麼不對?