将asp页面导出到WORD
来源:互联网 发布:手机探鱼器软件 编辑:程序博客网 时间:2024/06/05 16:08
js代码
<script language="javascript">
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
}
</script>
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
}
</script>
html代码
<html>
<head>
<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>
<head>
<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>
- 将asp页面导出到WORD
- 将页面内容导出到Word
- 将ASP.NET页面内的数据导出到Excel 或 Word中
- 将ASP.NET页面内的数据导出到Excel或Word中
- 将ASP.NET页面内的数据导出到Excel或Word中
- 将ASP.NET页面内地数据导出到Excel 或 Word里面
- ASP导出到Word
- 将GridView或其他页面元素导出到Word
- 使用JavaScript将Web页面内容导出到Word、Excel
- ASP.NET(C#)将数据导出到Word或Excel
- 将页面导出成word
- asp.net 页面导出word
- asp.net 导出到word
- 利用Word打印报表(一)-----将页面中的表格导出到word并打印
- 将页面保存到 word
- 黑马程序员之ASP.NET学习笔记:将数据导出到Word或Excel
- 将gridview数据导出到word
- java将html导出到word
- javascript实现时钟的多种方法
- 中国科协发布《科技工作者科学道德规范》
- 给年轻工程师的十大忠告
- 网站开发人员珍藏版网站
- 自定义分页
- 将asp页面导出到WORD
- 在点击一个超链接后调用一个js函数
- Forms验证的知识
- Win32调试API(1)
- Win32调试API(2)
- .net打包自动安装数据库!
- Win32调试API(3)
- 华为人如何管理时间
- jbuilder 2005中oracle数据库的连接