出现了
Access to XMLHttpRequest at 'xxx' from origin 'null' has
been blocked by CORS policy: Cross origin requests are
only supported for protocol schemes: http, data, chrome,
chrome-extension, https.
解决方法
创建一个chrome浏览器的快捷方式,右键–属性–快捷方式,在目标一栏的后面添加
--user-data-dir="c:\ChromeDebug" --test-type --disable-web-security
然后将html拖拽到这个快捷方式上打开,即可解决问题。