Navigator.mssaveblob函数在ie11中不起作用 [英] Navigator.mssaveblob function is not working in ie11
问题描述
我使用msSaveBlob()命令将csv文件下载到本地。我遇到了一个问题,虽然navigate.msSaveBlob返回true,并且控制台上没有错误;我被提示无法下载文件。重试或取消。我正在使用IE11,操作系统是Windows Server 2012 R2。我试过更新IE。但它仍然没有用。
我也试过https://msdn.microsoft.com/en-us/library/hh779016(v=vs)的样本0.85)的.aspx。但面临同样的问题。
请建议我如何解决这个问题。
我尝试了什么:
我试过的代码是
代码片段:
var blob = new Blob([ Sample,String\\ n,For Checking,msSaveBlob],{
类型:' text / csv; charset = utf-8 ;'
});
if ( navigator .msSaveBlob){
navigator .msSaveBlob(blob, sample.csv );
是否有任何错误消息提示,如果没有,您可能已在浏览器中禁用了下载设置
I have used msSaveBlob() command to download a csv file to local. I am facing an issue although navigate.msSaveBlob is returning true, and there are no errors on console; I am being prompted that "File Couldn't be downloaded. Retry or Cancel". I am working on IE11, and OS is Windows Server 2012 R2. I tried updating IE. But still it is not working.
I also tried the samples from https://msdn.microsoft.com/en-us/library/hh779016(v=vs.85).aspx. But facing the same issue.
Kindly suggest me how to resolve this issue.
What I have tried:
The code which I have tried is
Code Snippet:
var blob = new Blob(["Sample,String\r\n,For Checking, msSaveBlob"],{
type:'text/csv;charset=utf-8;'
});
if(navigator.msSaveBlob){
navigator.msSaveBlob(blob,"sample.csv");
Does there any error message prompt, if not, you may have disabled the download in your browser Settings
这篇关于Navigator.mssaveblob函数在ie11中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!