您的位置:首页 > Web前端 > JavaScript

ie js实现打开另存为对话框,

2014-07-24 16:20 344 查看
js:
var
userAgent = navigator.userAgent,
isIE = /msie/i.test(userAgent) && !window.opera,
isWebKit = /webkit/i.test(userAgent),
isFirefox = /firefox/i.test(userAgent);
var url = jQuery("#xuwanting")[0].src;
if(isIE){
n==0?new function(){frames("savelocals").location=url,n=1}:null;
document.all("savelocals").readyState!="complete"?setTimeout(savelocal,100):so();
function so(){frames("savelocals").document.execCommand("SaveAs"),n=0};
}
jsp:
<iframe src="" name="savelocals" id="savelocals" style="width:0;height:0"></iframe>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: