在客户端通过js下载文件,试过几种下载方式,iframe方式仅限于IE浏览器,window.open(url),location.href=url 这两种方式在chrome浏览器还会是直接打开文件而不是下载,百度N久没有结果,在谷歌还是找到答案了,下载链接在此. window.downloadFile = function (sUrl) { //iOS devices do not support downloading. We have to inform user about this. i
function DownURL(strRemoteURL, strLocalURL){ try{ var xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP"); xmlHTTP.open("Get", strRemoteURL, false); xmlHTTP.send(); var adodbStream =
function DownURL(strRemoteURL, strLocalURL){ try{ var xmlHTTP = new ActiveXObject("Microsoft.XMLHTTP"); xmlHTTP.open("Get", strRemoteURL, false); xmlHTTP.send(); var adodbStream = new ActiveXObject("ADODB.Stream"); adodbStrea