window.document.execCommand("SaveAs",false,id+".xls"); 在IE7下的问题
来源:互联网 发布:局域网桌面监视软件 编辑:程序博客网 时间:2024/05/16 07:01
我也遇到了这个问题,这好像是微软为了安全性考虑,不能用execcommand函数导出除了txt,htm,html,以外的格式,如果你在上面把xls改成txt,就可以了,导出以后再在系统中改文件后缀名。对了,你上面的代码也有点小问题,实际上你的文件还没导出,就弹了提示成功的对话框,有点问题,呵呵!建议改成:
function outExcel(atblData){
var w = window.open("about:blank", "Excel", "widht=0, height=0");
w.document.write(atblData.outerHTML);
if(w.document.execCommand('Saveas',true, 'D://会员信息.txt))
alert("导出成功");
else
alert("导出失败!");
window.close();
}
- window.document.execCommand("SaveAs",false,id+".xls"); 在IE7下的问题
- IE6下背景图片不缓存问题或者document.execCommand("BackgroundImageCache",false,true)
- document.execCommand("BackgroundImageCache",false,true)
- document.execCommand(”BackgroundImageCache”, false, true)
- document.execCommand("BackgroundImageCache", false, true)
- 常用的document.execCommand
- document.execCommand()的作用
- 常用的DOCUMENT.EXECCOMMAND
- document.execCommand()的作用
- 常用的DOCUMENT.EXECCOMMAND
- 常用的DOCUMENT.EXECCOMMAND
- document.execCommand() 的作用
- JS的document.execCommand()
- IE7下window.open()的一个小问题
- 利用IE"错觉"实现document.execCommand("SaveAs","","") 默认保存为GB2312 格式
- document.execCommand()的用法小记
- document.execCommand()的用法小记
- document.execCommand()的用法小记
- 我们是否需要ORM(1)--前篇
- 用JavaScript对GridView进行上、下移动,并保存排序
- SaaS现经济价值 成二线厂商盈利新模式
- Oracle中job的使用详解
- VDSP函数调用时的参数传递
- window.document.execCommand("SaveAs",false,id+".xls"); 在IE7下的问题
- 测试11111
- 机会比实力重要---但实力不够的时候,肯定会流失机会!
- 插入代码
- 方文山------周杰伦御用作词
- 在VDSP中使用FP取得函数的调用堆栈
- 扫雷游戏程序及源代码--c#
- vc7中的ClassWizard
- 年初12大热门技术 年底走势如何