最新国产好看的视频,伊人天堂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
云阳县| 晋州市| 石城县| SHOW| 长兴县| 肥城市| 蓝田县| 荔波县| 那坡县| 海丰县| 井研县| 临夏市| 大港区| 舞阳县| 祁门县| 横山县| 广丰县| 长岛县| 连平县| 同仁县| 平邑县| 镇巴县| 大兴区| 苏尼特左旗| 弋阳县| 星子县| 仙桃市| 石柱| 巴楚县| 喀喇沁旗| 黄山市| 衡东县| 获嘉县| 嘉祥县| 绥芬河市| 松原市| 玛多县| 临潭县| 襄城县| 富川| 郁南县|