Open the download link with 3 ways

Need to open the link in the project browser download, window.open and window.location.href and a label:

Most started using window.open (url, '_ blank') opened, but not used in the IE browser and 360, the page does not download content directly, can only refresh in order to have a pop-up prompts to download,

After using window.location.href = url written 360 pages in IE has been able to open the download prompt box, but not the newly opened page, but in the current page, it is not possible,

Finally, a label I direct and dynamic link href written jump download, finally solved the problem, is not compatible with the pages you can be prompted to download the box, and can also open up a new page.

Guess you like

Origin blog.csdn.net/qq_39598092/article/details/90716304