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代码吗
不行的 在IE6还是出现这个问题
"Automation服务器不能创建对象"