let link = document.createElement("a");
              link.style.display = "none";
              link.href ="http://www.baidu.com/asdfa.zip";
              console.log(link.href)
              link.setAttribute("download", "文件名称");
              document.body.appendChild(link);
              link.click();

 

Logo

前往低代码交流专区

更多推荐