导出网页到word js

if (confirm("请确认开始下载")) {
dayinDiv.style.border = 0;
ExcelSheet = new ActiveXObject('Word.Application');
ExcelSheet.Application.Visible = true;
var mydoc = ExcelSheet.Documents.Add('', 0, 1);
myRange = mydoc.Range(0, 1);
var sel = dayinDiv.document.body.createTextRange();
sel.select();
dayinDiv.document.execCommand('Copy');
sel.moveEnd('character');
myRange.Paste();
location.reload();
ExcelSheet.ActiveWindow.ActivePane.View.Type = 7;
}

这短js只能在IE6以上使用 谷歌也不能用 IE6 也不行 有谁知道兼容 谷歌IE6 火狐等浏览器的'导出网页到word'的js代码吗

李琼啊 在html head 里面加上 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 试试追问

不行的 在IE6还是出现这个问题
"Automation服务器不能创建对象"

温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网