asp.net.ph

Skip Navigation Links

Attribute Object

Language References


Represents an attribute or property of an HTML element as an Attribute object.HTML 2, 3.2, 4, 4.01, 5

Remarks

The Attribute object is accessible via the attributes collection.

A valid attribute or property can be any Dynamic HTML property or event that applies to the object, or an expando.

Members

Attribute Members

Example

The following sample demonstrates the use of the Attribute object to change the value of the STYLE attribute for a UL object.

<script language="JavaScript">
function fnChangeStyle ( ) {
   var oStyle = oItem1.attributes.item ( "STYLE" );
   oStyle.nodeValue = "#505050";
}
</script>

<ul>
   <li id="oItem1">List Item 1
</ul>


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note