解决chrome浏览器,调试本地文件问题

来源:互联网 发布:电子商城微信源码 编辑:程序博客网 时间:2024/06/08 04:51

参考: http://www.chromium.org/developers/how-tos/run-chromium-with-flags

错误描述: XMLHttpRequest cannot load file "file/path/here" Cross origin requests are only supported for HTTP

解决方法:

On Windows:

  1. Right click on your "Chrome" icon.
  2. Choose properties
  3. At the end of your target line add the command line flag. For example:
    • --remote-debugging-port=9222
  4. With that example flag, it should look like: chrome.exe --remote-debugging-port=9222
解决方法:添加参数 --allow-file-access-from-files

0 0
原创粉丝点击