我正在使用 window.location.href('URL'); 使用 javascript 打开 Excel 文件
它在 Firefox、Safari 中工作正常,但在 IE8 中它显示一个空白屏幕,然后显示一个文件对话框。 IE 出现什么问题?
最佳答案
改为在 iFrame 中打开它。
<iframe name="hiddenframe" style="display:none"></iframe>
你的JS将是:
hiddenframe.src = "myexcelfile.xlsx";
关于javascript - IE8 中的 window.location.href 轻弹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8209372/