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

推荐订阅源

Schneier on Security
Schneier on Security
A
About on SuperTechFans
月光博客
月光博客
WordPress大学
WordPress大学
小众软件
小众软件
H
Help Net Security
云风的 BLOG
云风的 BLOG
C
Cybersecurity and Infrastructure Security Agency CISA
U
Unit 42
Y
Y Combinator Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Hacker News
The Hacker News
T
The Exploit Database - CXSecurity.com
AI
AI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - Franky
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
S
Security Affairs
腾讯CDC
B
Blog
O
OpenAI News
美团技术团队
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
Spread Privacy
Spread Privacy
Cyberwarzone
Cyberwarzone
Hacker News - Newest:
Hacker News - Newest: "LLM"
G
Google Developers Blog
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Tenable Blog
有赞技术团队
有赞技术团队
L
Lohrmann on Cybersecurity
Attack and Defense Labs
Attack and Defense Labs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
I
InfoQ
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 三生石上(FineUI控件)
C
Cyber Attacks, Cyber Crime and Cyber Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Project Zero
Project Zero
Martin Fowler
Martin Fowler

博客园 - chance

SQLServer 2008的数据库镜像实施笔记 报表服务器无法打印 人生值得学习的81句话 人件之名言警句 将 BLOB 值写入 SQL Server 时保留资源 Reporting Service 在打印或预览时可能会导致出现空白页的原因 asp.net中如何打印ReportViewer报表 - chance - 博客园 [翻译]使用ASP.NET2.0的ReportViewer查看RDLC报表 基于消息与.Net Remoting的分布式处理架构 C#程序实现动态调用DLL的研究 javascript事件列表解说 微型项目实践感悟 DELPHI:利用INI文件实现界面无闪烁多语言切换 Delphi - 利用INI文件实现界面多语言切换 SQLServer2000的数据库容量是多大? MessageBox对话框 项目经理是这样当的 SQL Server 存储过程的分页方案比拼 动态调用Webservice
js 操作IE游览器 window.external...
chance · 2007-01-15 · via 博客园 - chance

js 操作IE游览器 window.external...

1、window.external...
<INPUT onclick='window.external.ImportExportFavorites(true,"
http://localhost");' type=button value=导入收藏夹>
<INPUT onclick='window.external.ImportExportFavorites(false,"
http://localhost");' type=button value=导出收藏夹>
<INPUT onclick="window.external.ShowBrowserUI('OrganizeFavorites', null)" type=button value=整理收藏夹>
<INPUT onclick="window.external.ShowBrowserUI('LanguageDialog', null)" type=button value=语言设置>
<INPUT onclick="window.external.AddFavorite('http://blog.csdn.net/Opossum/', '学习,讨论')" type=button value=加入收藏夹>
<INPUT onclick="window.external.addChannel('http://blog.csdn.net/Opossum/')" type=button value=加入到频道>
      相关:<INPUT onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://blog.csdn.net/Opossum/')" type=button value=设成主页>

2、history...
<INPUT onclick=history.go(1) type=button value=前进>
<INPUT onclick=history.go(-1) type=button value=后退>
<INPUT onclick=history.forward() type=button value=前进>
<INPUT onclick=history.back() type=button value=后退>

3、document.execCommand...
<INPUT onclick="document.execCommand('Cut')" type=button value=剪切>
<INPUT onclick="document.execCommand('Copy')" type=button value=拷贝>
<INPUT onclick="document.execCommand('Paste')" type=button value=粘贴>
<INPUT onclick="document.execCommand('Undo')" type=button value=撤消>
<INPUT onclick="document.execCommand('Delete')" type=button value=删除>
<INPUT onclick="document.execCommand('Bold')" type=button value=黑体>
<INPUT onclick="document.execCommand('Italic')" type=button value=斜体>
<INPUT onclick="document.execCommand('Underline')" type=button value=下划线>
<INPUT onclick="document.execCommand('stop')" type=button value=停止>
<INPUT onclick="document.execCommand('SaveAs')" type=button value=保存>
<INPUT onclick="document.execCommand('Saveas',false,'c:\\test.htm')" type=button value=另存为>
<INPUT onclick="document.execCommand('FontName',false,fn)" type=button value=字体>
<INPUT onclick="document.execCommand('FontSize',false,fs)" type=button value=字体大小>
<INPUT onclick="document.execCommand('refresh',false,0)" type=button value=刷新>

4、 window.location...
<INPUT onclick=window.location.reload() type=button value=刷新 name=refresh>
<INPUT onclick='window.location="view-source:" + window.location.href' type=button value=查看源文件 name=Button7>

5、WebBrowser.ExecWB...
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(2,1) type=button value=关闭所有><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) type=button value=另存为><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(6,1) type=button value=打印><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(6,6) type=button value=直接打印><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(7,1) type=button value=打印预览><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=页面设置><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(10,1) type=button value=属性><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(17,1) type=button value=全选><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(22,1) type=button value=刷新><br />
<input name=Button onClick=document.all.WebBrowser.ExecWB(45,1) type=button value=关闭>

<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>是在页面内载入该控件,以便调用该控件的方法,这个classid在系统注册表里是唯一的,如果改了,就可能是别的控件或者是不存在的控件的id了,所以不可以更改

附WebBrowser.ExecWB里面CMDID的参数(自己试一试):

OLECMDID_OPEN = 1,

OLECMDID_NEW = 2,

OLECMDID_SAVE = 3,

OLECMDID_SAVEAS = 4,

OLECMDID_SAVECOPYAS = 5,

OLECMDID_PRINT = 6,

OLECMDID_PRINTPREVIEW = 7,

OLECMDID_PAGESETUP = 8,

OLECMDID_SPELL = 9,

OLECMDID_PROPERTIES = 10,

OLECMDID_CUT = 11,

OLECMDID_COPY = 12,

OLECMDID_PASTE = 13,

OLECMDID_PASTESPECIAL = 14,

OLECMDID_UNDO = 15,

OLECMDID_REDO = 16,

OLECMDID_SELECTALL = 17,

OLECMDID_CLEARSELECTION = 18,

OLECMDID_ZOOM = 19,

OLECMDID_GETZOOMRANGE = 20,

OLECMDID_UPDATECOMMANDS = 21,

OLECMDID_REFRESH = 22,

OLECMDID_STOP = 23,

OLECMDID_HIDETOOLBARS = 24,

OLECMDID_SETPROGRESSMAX = 25,

OLECMDID_SETPROGRESSPOS = 26,

OLECMDID_SETPROGRESSTEXT = 27,

OLECMDID_SETTITLE = 28,

OLECMDID_SETDOWNLOADSTATE = 29,

OLECMDID_STOPDOWNLOAD = 30,

OLECMDID_ONTOOLBARACTIVATED = 31,

OLECMDID_FIND = 32,

OLECMDID_DELETE = 33,

OLECMDID_HTTPEQUIV = 34,

OLECMDID_HTTPEQUIV_DONE = 35,

OLECMDID_ENABLE_INTERACTION = 36,

OLECMDID_ONUNLOAD = 37,

OLECMDID_PROPERTYBAG2 = 38,

OLECMDID_PREREFRESH = 39,

OLECMDID_SHOWSCRIPTERROR = 40,

OLECMDID_SHOWMESSAGE = 41,

OLECMDID_SHOWFIND = 42,

OLECMDID_SHOWPAGESETUP = 43,

OLECMDID_SHOWPRINT = 44,

OLECMDID_CLOSE = 45,

OLECMDID_ALLOWUILESSSAVEAS = 46,

OLECMDID_DONTDOWNLOADCSS = 47,

OLECMDID_UPDATEPAGESTATUS = 48,

OLECMDID_PRINT2 = 49,

OLECMDID_PRINTPREVIEW2 = 50,

OLECMDID_SETPRINTTEMPLATE = 51,

OLECMDID_GETPRINTTEMPLATE = 52,

OLECMDID_PAGEACTIONBLOCKED = 55,

OLECMDID_PAGEACTIONUIQUERY = 56,

OLECMDID_FOCUSVIEWCONTROLS = 57,

OLECMDID_FOCUSVIEWCONTROLSQUERY = 58

OLECMDID_SHOWPAGEACTIONMENU = 59

Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1341217