惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
月光博客
月光博客
V
Visual Studio Blog
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
SecWiki News
SecWiki News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
F
Full Disclosure
The Cloudflare Blog
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
AI
AI
N
News and Events Feed by Topic
T
Tor Project blog
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog

博客园 - 老弹

列表中,将列表字段缩略显示的样式 DIV+CSS页面布局,样式中区别苹果浏览器Safari VS.NET 2008 发布站点,不带那些随机字符的网站发布插件 下拉菜单被flash挡住的最好解决方法 全球网络概况 IE不执行js脚本的解决方法 ToString格式大全 - 老弹 - 博客园 SQL语句关键字UNION小知识 关于PayPal的支付的问题 运行 Dcpromo 架设Active Directory (活动目录 )时,出现" 无法创建 GPO " 错误信息 .NET读写INI文件 document.location 这个对象包含了当前URL的信息 VBScript判断客户端是否需要下载控件 强制将在表格中将英文字母换行的CSS样式,加在表格table标签中 无法让网页另存为的代码 屏蔽IE中当图片太大时出现的图片按钮组的CSS样式 列出一个表中的某个字段重复的记录 分割以逗号作为分割符号的字符串并插入到表中 求助 RemObjects SDK 与 Data Abstracr
html导出word - 老弹 - 博客园
老弹 · 2008-01-17 · via 博客园 - 老弹

转自:http://www.lrsj.net/user1/4/archives/2007/287.html

js代码

 <script language="javascript"> 
500)this.style.width=500;" align=top>
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> 

posted on 2008-01-17 11:31  老弹  阅读(2593)  评论(0)    收藏  举报

刷新页面返回顶部