For friends made by the majority web page, the information saved on the webpage form is implemented, which is achieved by cookie technology, such as the options for the drop-down list box, and the data entered by the text box. In fact, we can use the USERDATA behavior in Microsoft DHTML default behavior to implement this function.
Because many netizens asked such a problem, they sorted it and provided three examples. The following will be an introduction to the behavior of the behavior:
UserData Behavior:
1, explanation:
UserData behavior saves data by writing data into a USERDATA Store, userData can save data on client computers in XML format, if you use Windows 2000 or Windows XP, is saved in C: / Documents and settings / limited / userData / folder (if the operating system is not installed in the C drive, C should be the partition where the operating system is located).
This data will always exist unless you have a delete or use script to set the data of the data.
UserData behavior provides a data structure that is more dynamic and greater than cookies. The UserData storage area data size per page can reach 64 KB, each domain name can reach 640 kB.
UserData behavior assigns the USERDATA storage area for each object via sessions. Save the UserData storage area data in the cache using the Save and Load methods. Once the USERDATA store is saved, even if the IE browser is turned off or refreshed, the data can be reloaded without being lost next time.
For security considerations, the same protocol saves USERDATA storage area data using the same folder.
For Security Reasons, A Userdata Store Is Available Only in The Same Directory and with with with the the Same Protocol Used to Persist The Store.
Using Save and Load methods after using the UserData behavior on HTML, Head, Title, and Style markers.
Setting the userdata behavior (proposed) Class on the HTML, Head, Title, or Style Object Causes An Error When the Save or Load Method Is Called.
The Head part of the inside or the document must be announced as follows:
.urserdata {behavior: URL (# default # userdata);
Style>
UserData behavior can be used in Microsoft? Win32? and the IE 5.0 or above on the UNIX platform does not support Netscape.
2, grammar:
HTML
Script object.style.behavior = "URL ('# default # userdata')"
Object.addbehavior ("# default # userdata")
Note: The SID parameter is a unique ID that can describe the tag. The ID is optional, but if there is, it can be easily controlled in the script.
3, member: Expires
Set or acquire the expiration date of using UserData behavior saving data.
Script syntax: object id.expires = parameter
The parameter is a string using the UTC (Universal Time Coordinate, the World Adjustment Time) format indicating the date of failure. This property can read and write, no default. The browser will compare this date and the current date. If expired, the data is automatically invalid.
GetaTtribute ()
Take the specified attribute value.
LOAD (storage area name)
Load the stored object data from the USERDATA storage area.
REMOVEATTRIBUTE ()
Delete the specified attribute value from the object.
Save (storage area name)
Put the object data into a USERDATA storage area.
SetAttribute ()
Set the specified attribute value.
XMLDocument
Number of XML DOM references that store the object data.
Specific usage can view MSDN (
http://msdn.microsoft.com)
4, example
Example 1: Application of Text Box Tag (Microsoft)
.urserdata {behavior: URL (# default # userdata);
Style>
Function fnsaveinput () {
VAR OPERSIST = OPERSISTFORM.OPERSISTINPUT;
OPERSIST.SetAttribute ("SPERSIST", OPERSIST.VALUE); // Store OPERSIST.VALUE as a SPERSIST attribute
OPERSIST.SAVE ("Oxmlbranch"); // Store UserData storage in OXMLBRANCH
}
Function fnLoadInput () {
VAR OPERSIST = OPERSISTFORM.OPERSISTINPUT;
OPERSIST.LOAD ("Oxmlbranch"); // Loads UserData storage in OXMLBRANCH
OPERSIST.VALUE = OPERSIST.GETATTRIBUTE ("SPERSIST"); // Assign the SPERSIST property to OPERSIST.VALUE
}
Script>
HEAD>