<<< JS Implementation Web page batch download file, support pc/mobile phone

Source: Internet
Author: User

Put the download link in the collection
var downloaddata = new array{"http://www.empli.com/data1.apk", "http://www.empli.com/data1.apk", "/HTTP// www.empli.com/data1.apk "," http://www.empli.com/data1.apk "};
var downloadnum=0;//Method Execution number Circularwindow (Downloadnum); function Circularwindow () {//Circular pop -up windowsetTimeout (function () {Jumpdownloadwindow (downloadnum); },500)///number of times set a delay, or some cell phone will be due to the failure to come up with errors
} function Jumpdownloadwindow (i) {//pop-up Download windowvar fileframe = document.createelement ("iframe"); FILEFRAME.SRC= Downloaddata[i];//file pathFileFrame.style.display = "None";     Document.body.appendChild (Fileframe); Downloadnum++;if(downloadnum!=downloaddata.length)    {Circularwindow (); }}
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.