1.前言 静态页面 加载 <script type="module" > 报CORS 跨域错误,提示Access to script at ftp:///xxx.js from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, ch
报错示例: 报错原因: 在vscode里面编写了一段js代码,使用了import来引入一个函数并调用 代码复现 // inherit() returns a newly created object that inherits properties from the // prototype object p. It uses the ECMAScript 5 function Object.create() if // it is defined, and otherwise falls ba
研究了一天,js访问本地文件本身是不可能的,只能借助于插件.植入正题,IE仅支持ActiveX插件. function openDialog() { try { var Message = "请选择文件夹"; //选择框提示信息 var Shell = new ActiveXObject("Shell.Application"); var Folder = Shell.BrowseForFolder(0, Message, 0x0040, 0x11); //起始目录