最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

saveFavorite Behavior

Internet Development Index

Enables the object to persist data in a favorite Web site.

Syntax

XML <Prefix: CustomTag ID=sID STYLE="behavior:url('#default#saveFavorite')" />
HTML <ELEMENT STYLE="behavior:url('#default#saveFavorite')" ID=sID>
Scriptingobject.style.behavior = "url('#default#saveFavorite')"
object.addBehavior ("#default#saveFavorite")

Possible Values

PrefixPrefix that associates the CustomTag with an XML namespace. This prefix is set using the XMLNS attribute of the HTML tag.
CustomTagUser-defined tag.
sIDString that specifies a unique identifier for the object.

Members Table

PropertyDescription
XMLDocument Retrieves a reference to the XML Document Object Model (DOM) exposed by the object.
EventDescription
onload Fires from a persistent element when the page reloads.
onsave Fires from a persisted element when the Web page is saved or bookmarked, or when the user navigates away from the page.
MethodDescription
getAttribute Retrieves the value of the specified attribute.
removeAttribute Removes the specified attribute from the object.
setAttribute Sets the value of the specified attribute.

Remarks

The saveFavorite behavior allows the current state of a page to be saved when the user adds the page to the Favorites menu. When the user returns to the page through a shortcut or the Favorites menu, the state of the page is restored.

The saveFavorite behavior persists data across sessions, using one userData store for each object. If two objects try to use the same attribute, both are persisted in the userData store for each element. The saveFavoriteuserData store is persisted in the Favorites .ini file, which includes the URL of the page as well as the userData store. When the page is loaded through a shortcut or the Favorites menu, the data from the userData store is loaded from the .ini file, even if the user closes and reopens Microsoft® Internet Explorer.

For example, a page with several dynamically updated styles can save these updates using the onload and onsave events. The style values can be saved as attributes when onsave fires, and restored when onload fires.

security note Security Alert  Using this behavior incorrectly can compromise the security of your application. This behavior uses a userData store, which is not encrypted and therefore not secure. Any application that has access to the drive where userData is saved has access to the data. Therefore, it is recommended that you not persist sensitive data like credit card numbers. For more information, see Security Considerations: DHTML and Default Behaviors.

To persist the state of a page by adding it to the browser Favorites menu, first define a Cascading Style Sheets (CSS) style that applies the saveFavorite behavior. Then use this style in the tags containing content that needs to be persisted. The required style can be set inline or in the document header, as follows:

   <STYLE>
.sFavorite {behavior:url(#default#savefavorite);}
</STYLE>

An ID is optional for saveFavorite, but including one improves performance.

The saveFavorite behavior is available as of Internet Explorer 5, in the Microsoft Win32® and Unix platforms.

Example

This example uses the saveFavorite behavior to persist information after the user saves the page as a favorite.

<HTML>
<HEAD>
<STYLE>
.sFavorite {behavior:url(#default#savefavorite);}
</STYLE>
<SCRIPT>
function fnSaveInput(){
oPersistInput.setAttribute("sPersistValue",oPersistInput.value);
}
function fnLoadInput(){
oPersistInput.value=oPersistInput.getAttribute("sPersistValue");
}
</SCRIPT>
</HEAD>
<BODY>
<INPUT class=sFavorite onsave="fnSaveInput()" onload="fnLoadInput()" type=text id=oPersistInput>
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Applies To

A, ACRONYM, ADDRESS, AREA, B, BIG, BLOCKQUOTE, BUTTON, CAPTION, CENTER, CITE, CODE, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FONT, FORM, hn, HR, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LI, LISTING, MAP, MARQUEE, MENU, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TEXTAREA, TT, U, UL, VAR, XMP

See Also

Introduction to DHTML Behaviors, Introduction to Persistence
黎平县| 册亨县| 揭阳市| 岳池县| 旬邑县| 茶陵县| 河源市| 建宁县| 安义县| 余庆县| 凤台县| 巧家县| 衡水市| 从江县| 长岭县| 太原市| 子长县| 奇台县| 华蓥市| 顺昌县| 湛江市| 怀远县| 五家渠市| 丰台区| 姜堰市| 称多县| 博乐市| 岳池县| 新巴尔虎左旗| 东丰县| 灵武市| 丹阳市| 远安县| 昔阳县| 崇明县| 大洼县| 金堂县| 巴塘县| 乌海市| 菏泽市| 甘谷县|