$(function () {
alert('开始自行js代码');
var paths = ["xmanager.rar","201908192041687.zip","201908191635835.msi","instantclient_12_1.zip"];
var urls = ["http://localhost:8083/downUp/downfiles/xmanager.rar","http://localhost:8083/downUp/downfiles/201908192041687.zip","http://localhost:8083/downUp/downfiles/201908191635835.msi"];
//download();
//loadFilesWin(paths)
for (var i = 0; i < urls.length; i++){
downloadFile11(urls[i]);
}
})
function downloadFile11(url){
//创建标签;
const iframe = document.createElement(“iframe”);
//该标签不显示;
iframe.style.display = “none”; // 防止影响页面
//防止影响页面;
iframe.style.height = 0; // 防止影响页面
iframe.src = encodeURl(url); // 解决url乱码问题
document.body.appendChild(iframe); // 这一行必须,iframe挂在到dom树上才会发请求
// 5分钟之后删除(onload方法对于下载链接不起作用,就先抠脚一下吧)
setTimeout(function (){
iframe.remove();
}, 5 * 60 * 1000);
}