这是我的代码:
this.loadMap = function () { this._map = null; this._width = 0; this._height = 0; this._playerX = 0; this._playerY = 0; this.finished = false; this.loaded = false; $.ajax({ type: "GET",url: "maze1.xml",dataType: "xml",success: this.parseXmlMap,context: this }); };
我得到的错误是
“XMLHttpRequest cannot load
file:///C:/wamp/www/mazegame/maze1.xml.
Origin null is not allowed by
Access-Control-Allow-Origin”.
这个相同的脚本在Firefox中工作正常