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

1、window.external...

 

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

 

相关:

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

  2、history...

写道
<INPUTοnclick=history.go(1)type=buttonvalue=前进>
<INPUTοnclick=history.go(-1)type=buttonvalue=后退>
<INPUTοnclick=history.forward()type=buttonvalue=前进><INPUTοnclick=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...

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

 5、WebBrowser.ExecWB...

写道
<OBJECTclassid=CLSID:8856F961-340A-11D0-A96B- 00C04FD705A2height=0id=WebBrowserwidth=0></OBJECT>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(2,1)type=buttonvalue= 关闭所有>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(4,1)type=buttonvalue= 另存为>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(6,1)type=buttonvalue= 打印>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(6,6)type=buttonvalue= 直接打印>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(7,1)type=buttonvalue= 打印预览>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(8,1)type=buttonvalue= 页面设置>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(10,1)type=buttonvalue= 属性>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(17,1)type=buttonvalue= 全选>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(22,1)type=buttonvalue= 刷新>
<inputname=ButtononClick=document.all.WebBrowser.ExecWB(45,1)type=buttonvalue= 关闭>
<OBJECTclassid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2height=0id=WebBrowserwidth=0></OBJECT>

 是在页面内载入该控件,以便调用该控件的方法,这个classid在系统注册表里是唯一的,如果改了,就可能是别的控件或者是不存在的控件的id了,所以不可以更改

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值