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

setAttribute Method

Internet Development Index

Sets the value of the specified attribute.

Syntax

object.setAttribute(sAttrName, vAttrValue)

Parameters

sAttrName Required. String爐hat specifies the name of the persistent attribute.
vAttrValue Required. Variant that specifies the value of the persistent attribute.

Return Value

No return value.

Remarks

If the specified attribute is not already present, the setAttribute method adds the attribute to the object and sets the value.

The sAttrName value is not case sensitive.

This method requires an object participating in persistence, where that object has a class name equal to the desired persistence behavior. An ID is required for the userData and saveSnapshot behaviors, and recommended for the saveHistory and saveFavorite behaviors.

This method overrides the DHTML setAttribute method.

Example

This example uses the setAttribute method to set an attribute on an object participating in userData persistence.

<HEAD>
<STYLE>
.userData {behavior:url(#default#userdata);}
</STYLE>
<SCRIPT>
function fnGet(){
oPersistInput.load("oDataStore");
oPersistInput.value=oPersistInput.getAttribute("sPersistAttr");
}
function fnSet(){
oPersistInput.setAttribute("sPersistAttr",oPersistInput.value);
oPersistInput.save("oDataStore");
}
function fnRem(){
oPersistInput.removeAttribute("sPersistAttr");
oPersistInput.save("oDataStore");
}
</SCRIPT>
</HEAD>
<BODY >
<INPUT type=text class=userData id=oPersistInput>
<INPUT type=button value="Get Attribute" onclick="fnGet()">
<INPUT type=button value="Set Attribute" onclick="fnSet()">
<INPUT type=button value="Remove Attribute" onclick="fnRem()">
</BODY>
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.

Standards Information

This method is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

saveFavorite, saveHistory, userData

See Also

Introduction to DHTML Behaviors, Introduction to Persistence, getAttribute, removeAttribute
津南区| 广丰县| 疏附县| 浦城县| 封丘县| 平泉县| 来宾市| 赫章县| 永寿县| 大化| 淅川县| 洞口县| 融水| 山西省| 安远县| 岱山县| 康定县| 金川县| 楚雄市| 义乌市| 马公市| 肇庆市| 四平市| 萨迦县| 赤壁市| 甘谷县| 宜兰县| 华蓥市| 壤塘县| 景德镇市| 黔南| 定陶县| 鄂托克前旗| 乌鲁木齐市| 乐平市| 连平县| 申扎县| 芮城县| 长岛县| 岗巴县| 普安县|