style.setAttribute() (Method)

A method for setting attributes in styles.

Availability:

JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
JavaScript syntax:-myStyle.setAttribute(aName, aValue)
Argument list:aNameThe name of an attribute to set
aValueThe value to be stored in the attribute

This method is used to define attribute values that can be accessed or redefined later on.

See also:style.getAttribute()