html导出word
终极管理员 知识笔记 37阅读
转自:js代码脚本语言=' JavaScript ' 500)这个。风格。宽度=500;align=topfunctionOpenWord().{第一层。风格。border=0 excel sheet=new ActiveX object(' word .应用');ExcelSheet .申请visible=true varmydoc=excel工作表。文件。添加(' '0, 0, 1)'1);myRange=mydoc .Range(0,1)varsel=第1层。文档。身体。创建文本范围()选择。选择()第1层。文档。执行命令(“复制”)选择。moveend(' character ')我的范围.paste();location.reload()ExcelSheet .活动窗口。活动窗格。查看。type=9 }/编写html脚本代码htmlhead
gba(128, 0, 0, 1)">meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>网页上内容导出到word</title>
</head>
<body>
<div id="Layer1" >
<input type=button name='button_export' title='导出到word' onclick=OpenWord() value=下载到word></div>
</div>
<table align="center" width="300" border="1" bordercolor="#2baeff" cellpadding="0" cellspacing="0" bgcolor="lightblue">
<Tr><Td>1</td><Td>2</td><Td>3</td></tr>
<Tr><Td>4</td><Td>5</td><Td>6</td></tr>
<Tr><Td>7</td><Td>8</td><Td>9</td></tr>
</table>
</body>
</html>


标签: