网页上内容导出到word Happy New Year ! ! ! this is a test! 123 456 789 function OpenWord(){ Layer1.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=Layer1.document.body.createTextRange() sel.select() Layer1.document.execCommand('Copy') sel.moveEnd('character') myRange.Paste(); location.reload() ExcelSheet.ActiveWindow.ActivePane.View.Type=9 }