window.external使用大全

简介:window.external.AddFavorite这个把网站添加到浏览者收藏夹的脚本大家应该常常看过,但你还知道window.external的另外一些用法呢?由于是一些关于系统文件操作的命令,因为安全设置有些脚本会出错误.

1.external.AddDesktopComponent 把网站作为用户的Active桌面

语法:external.AddDesktopComponent(地址,类型[image/website],左距离,顶距离,宽度,长度)

   function j_adc(){ //例子

       window.external.AddDesktopComponent("http://...","website",0,0,800,600);

   }

2.external.AddFavorite 把网站加入到用户的收藏夹

语法:external.AddFavorite(网址,标题);

   function j_af(){

       window.external.AddFavorite(location.href, document.title);

  }

3.external.NavigateAndFind 搜索指定网站中的某个字段

语法:external.NavigateAndFind(文件地址,关键字,_Target)

       function j_an(){

           window.external.NavigateAndFind("http://...",gosearch.value,"");

       }

4.external.ShowBrowserUI 调用语言选择窗口与收藏夹管理窗口

语法:external.ShowBrowserUI(类型[LanguageDialog/OrganizeFavorites], null)

      <input type="button" name="Button" value="语言设置" οnclick="window.external.ShowBrowserUI('LanguageDialog', null)">

      <input type="button" name="Submit2" value="整理收藏夹" οnclick="window.external.ShowBrowserUI('OrganizeFavorites', null)">

5.external.ImportExportFavorites 导入与导出用户收藏夹

语法:external.ImportExportFavorites(导入/true 导出/false, 文件路径)

    <input type="button" name="Button" value="导入收藏夹"                               

       onClick=window.external.ImportExportFavorites(true,"http://...");>

<input type="button" name="Button3" value="导出收藏夹"    

       onClick=window.external.ImportExportFavorites(false,"http://...");>

6.external.addChanne 加入到频道

语法:external.addChannel(网页路径)

7.下面是external对象所有方法列表

MethodDescription
AddChannelObsolete. Presents a dialog box that enables the user to add the specified channel, or to change the channel URL, if it is already installed.
AddDesktopComponentAdds a Web site or image to the Microsoft Active Desktop.
AddFavoritePrompts the user with a dialog box to add the specified URL to the Favorites list.
AddSearchProviderAdds a search provider to the registry.
AddServiceUser initiated action to add a service.
AddToFavoritesBarAdds a URL to the Favorites Bar.
AutoCompleteSaveFormSaves the specified form in the AutoComplete data store.
AutoScanNo longer available as of Internet Explorer 7. Attempts to connect to a Web server by passing the specified query through completion templates.
BrandImageUriNot supported. Retrieves the Uniform Resource Identifier (URI) of an alternate product image.
bubbleEventPropagates an event up its containment hierarchy.
ContentDiscoveryResetResets the list of feeds, search providers, and Web Slices associated with the page.
CustomizeClearTypeNot supported. Sets a registry value to turn ClearType on or off.
CustomizeSettingsNot supported. Saves the user settings from a "first run" page.
DefaultSearchProviderNot supported. Retrieves the name of the user's default search provider.
DiagnoseConnectionNot supported. Attempts to diagnose problems with the network connection.
ImportExportFavoritesDeprecated. Handles the import and export of Internet Explorer favorites.
InPrivateFilteringEnabledDetects whether the user has enabled InPrivate Filtering.
IsSearchMigratedNot supported. Determines whether autosearch settings were migrated from a previous version of Internet Explorer.
IsSearchProviderInstalledDetermines if a search provider has been installed for the current user and whether it is set as default.
IsServiceInstalledCheck if a service is already installed.
IsSubscribedObsolete. Retrieves a value indicating whether the client subscribes to the given channel.
NavigateAndFindNavigates to the specified URL and selects the specified text.
PhishingEnabledNot supported. Determines whether Microsoft Phishing Filter is enabled.
raiseEventTriggers an event, as specified.
RunOnceHasShownNot supported. Determines whether the "first run" page has been shown.
RunOnceRequiredSettingsCompleteNot supported. Sets a registry value to indicate whether the "first run" page completed successfully.
RunOnceShownNot supported. Sets a registry value to indicate that the "first run" page has been shown.
SearchGuideUrlNot supported. Retrieves the URL of a page that can be used to install additional search providers.
setContextMenuConstructs a context menu, as specified.
ShowBrowserUIOpens the specified browser dialog box.
SkipRunOnceNot supported. Enables the user to select "first run" settings at a later time.
SkipTabsWelcomeNot supported. Disables the welcome screen that appears when opening a new tab in Internet Explorer 7.
SqmEnabledNot supported. Determines whether Software Quality Monitoring (SQM) is enabled.

转载于:https://my.oschina.net/yearnfar/blog/47846

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值