利用js自动触发一个a标签的下载事件
html
<a id="a-upload"></a>
js
var link = document.getElementById('a-upload'); $(link).attr("href", "http://p370kpyfw.bkt.clouddn.com/app-release_100_jiagu_sign.apk"); $(link).attr("download", "http://p370kpyfw.bkt.clouddn.com/app-release_100_jiagu_sign.apk"); link.click();