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