HBCMS更多的中文手册参考:

AddFavorite Method

DHTML文档教程

Prompts the user with a dialog box to add the specified URL to the Favorites list.

dhtml语法

external.AddFavorite(sURL [, sTitle])

Parameters

sURL Required. String that specifies the URL of the favorite to be added to the Favorites list.
sTitle Optional. Stringthat specifies the suggested title to be used in the Favorites list. The user can change the title in the Add Favorite dialog box.

Return Value

No return value.

Remarks

Calling the AddFavorite method prompts the user with the same dialog box that is presented when the user selects Add to Favorites from the Favorites menu.

This method is not supported in html applications (htas).

DHTML代码范例

This example uses the AddFavorite method to prompt a user to add the current page to the Favorites list.

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

是否符合公共标准

There is no public standard that applies to this method.

Applies To

external