HBCMS更多的中文手册参考:

ImportExportFavorites Method

DHTML文档教程

Handles the importing and exporting of Microsoft® Internet Explorer favorites.

dhtml语法

external.ImportExportFavorites(bImportExport, sImportExportPath)

Parameters

bImportExport Required. Boolean that specifies one of the following possible values.
trueImport is requested.
falseExport is requested.
sImportExportPath Required. String that specifies the location (URL) to import or export, depending on bImportExport . If a value is an empty string, a file dialog box is opened.

Return Value

No return value.

Remarks

Favorites that reference local files are not created during import. They are filtered out without comment and the program continues.

The ImportExportFavorites method imports favorites from or exports favorites to an HTML page in the Netscape bookmark format. Confirmation is required before the import or export begins.

All favorites are uploaded to the server when exported. Favorites are sent with a POST operation to the server URL specified in the sImportExportPath parameter. For more information, see httpsendrequest and http sessions.

it is recommended that the server be configured to erase previously stored favorites before accepting the updates. favorites imported from the server merge with existing favorites on the client. deletions on the server do not propagate to the client.

this method is not supported in introduction to html applications (htas).

Examples

This example uses the ImportExportFavorites method to import Favorites information from the server.

// 'true' specifies that the Favorites are imported from the server.
window.external.ImportExportFavorites(
true,"http://www.your_server.com");

This example uses the ImportExportFavorites method to export Favorites information from the server.

// 'false' specifies that the Favorites are exported to the server.
window.external.ImportExportFavorites(
false,"http://www.your_server.com");

This example uses the ImportExportFavorites method to open a file dialog box.

// If the path given is an empty string, a dialog box is opened.
window.external.ImportExportFavorites(false, "");

是否符合公共标准

There is no public standard that applies to this method.

Applies To

external

更多语法参考

Netscape Bookmark File Format