日期:2014-05-16  浏览次数:20389 次

JS 操作IE游览器常用函数:window.external,history,document.ex

1、window.external...

?

写道
<INPUTonclick='window.external.ImportExportFavorites(true,"http://localhost"); 'type=buttonvalue=导入收藏夹>< INPUTonclick='window.external.ImportExportFavorites(false,"http://localhost");'type=buttonvalue= 导出收藏夹>
<INPUTonclick="window.external.ShowBrowserUI('OrganizeFavorites',null)"type=buttonvalue= 整理收藏夹>
<INPUTonclick="window.external.ShowBrowserUI('LanguageDialog',null)"type=buttonvalue= 语言设置>
<INPUTonclick="window.external.AddFavorite('http://blog.csdn.net/Opossum/','学习,讨论')"type=buttonvalue=加入收藏夹>
<INPUTonclick="window.external.addChannel('http://blog.csdn.net/Opossum /')"type=buttonvalue=加入到频道>

?

相关:

写道
<INPUTonclick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://blog.csdn.net/Opossum/')"type=buttonvalue=设成主页& amp; gt;

? 2、history...

写道
<INPUTonclick=history.go(1)type=buttonvalue=前进>
<INPUTonclick=history.go(-1)type=buttonvalue=后退>
<INPUTonclick=history.forward()type=buttonvalue=前进><INPUTonclick=history.back()type=buttonvalue=后退>

?3、document.execCommand...

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

?4、window.location...

写道
<INPUTonclick=window.location.reload()type=buttonvalue=刷新 name=refresh>
<INPUTonclick='window.location="view- source:"+window.location.href'type=buttonvalue=查看源文件name=Button7>

?5、WebBrowser.ExecWB...

写道