0
我試圖從本地文件系統讀取文件。我沒有可用的服務器,因此我試圖這樣做。這是我到目前爲止;Dojo使用dojo.xhrGet從本地文件系統讀取json文件
function init(){
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
dojo.xhrGet(
{
url: "/json/coursedata.json",
handleAs:"json",
load: function (type, data, evt) {alert (data) },
//mimetype: "text/plain"
});
}
我從螢火蟲控制檯收到這個錯誤;
Access to restricted URI denied" code: "1012
http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js
Line 16