Internet explorer 用于在Internet Explorer 9中不工作的另存为的execCommand
下面是我使用execCommand保存csv文件的函数 我无法在IE 9中看到“另存为”对话框 如果我从 “另存为”对话框打开,但我在“另存为”对话框中看到文件名未命名 如何在“另存为”对话框中将文件名设置为test.csv而不是untitled 谢谢Internet explorer 用于在Internet Explorer 9中不工作的另存为的execCommand,internet-explorer,execcommand,Internet Explorer,Execcommand,下面是我使用execCommand保存csv文件的函数 我无法在IE 9中看到“另存为”对话框 如果我从 “另存为”对话框打开,但我在“另存为”对话框中看到文件名未命名 如何在“另存为”对话框中将文件名设置为test.csv而不是untitled 谢谢 function opensave() { var w = window.open('about:blank', '_blank'); w.document.write(csvText); w.document.close
function opensave() {
var w = window.open('about:blank', '_blank');
w.document.write(csvText);
w.document.close();
var success = w.document.execCommand('SaveAs', true, 'test.csv');
w.close();
}
w.document.execCommand('SaveAs', true, 'test.csv');