Problems with jQuery getJSON using local files in Chrome

前端 未结 7 1364
情书的邮戳
情书的邮戳 2020-11-22 16:21

I have a very simple test page that uses XHR requests with jQuery\'s $.getJSON and $.ajax methods. The same page works in some situations and not in others. Specificially,

7条回答
  •  花落未央
    2020-11-22 16:54

    On Windows, Chrome might be installed in your AppData folder:

    "C:\Users\\AppData\Local\Google\Chrome\Application"

    Before you execute the command, make sure all of your Chrome windows are closed and not otherwise running. Or, the command line param would not be effective.

    chrome.exe --allow-file-access-from-files
    

提交回复
热议问题