批量下载某一页面的所有链接地址:
var ip = document.getElementsByClassName("link-click");
var str = "";
for(var i=0;i<ip.length;i++)
{
var node = ip[i].href;
if(undefined != node) {
str+="\n"+decodeURI(node);
if(node.indexOf("xlsx") != -1) {
var frame = $('<iframe style="display: none;" class="multi-download"></iframe>');
frame.attr('src', node);
$(document.body).append(frame);
setTimeout(function() {
frame.remove();
}, 1000);
}
}
}
console.log(str);
网友评论