Error: “Origin null is not allowed by Access-Control-Allow-Origin” when loading an XML file with JQuery's ajax method

后端 未结 5 1739
我在风中等你
我在风中等你 2020-11-30 10:27

This is my code:

this.loadMap = function () {
    this._map = null;
    this._width = 0;
    this._height = 0;
    this._playerX = 0;
    this._playerY = 0;
         


        
5条回答
  •  感情败类
    2020-11-30 10:47

    Just to reiterate what Paul & Juggernaut said:

    In OSX open terminal and paste this command

    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files
    

提交回复
热议问题