问题:
Access to XMLHttpRequest at 'file:///D:/Web/ChuYanyu/%E6%A8%A1%E5%9D%97%E5%8C%96/day02/%E6%A1%88%E4%BE%8B/index.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.
requie.js:2420 GET file:///D:/Web/ChuYanyu/%E6%A8%A1%E5%9D%97%E5%8C%96/day02/%E6%A1%88%E4%BE%8B/index.js net::ERR_FAILED
解决:
在Visual Studio Code中你当前的.html文件页面,右键点击 Open with Live Server 即可。然后打开-检查-打开控制台