如何在Internet Explore中下载文件另存为dailog框。 [英] How do download file save as a dailog box in internet Explore.

查看:101
本文介绍了如何在Internet Explore中下载文件另存为dailog框。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我的项目我已经实现了与 的链接。它在Chrome浏览器中运行良好。但现在我的要求是我如何实现与Internet Explorer中相同的功能。我用document.execCommand尝试了很多(SaveAs,false,);但不完全明白。



提前帮助我,谢谢。

Hello,

I my project i have implement a link with . its working fine in Chrome Browser. But now my requirement is that how can i implement with the same as in internet Explorer. i tried a lot with document.execCommand("SaveAs", false, ""); but not exactly got it.

Help me , Thankx in advance.

推荐答案

Hi


您能否请使用以下内容:

Hi
Can you please use following:
window.open('complete your file path');



它将在新窗口中要求下载或打开文件。


it will ask for download or open file in new window.


这是针对IE



This is for IE

f ( !! window.ActiveXObject && document.execCommand)     {
        var _window = window.open(fileURL, '_blank');
        _window.document.close();
        _window.document.execCommand('SaveAs', true, fileName || fileURL)
        _window.close();
    }


这篇关于如何在Internet Explore中下载文件另存为dailog框。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆