DHTML Methods
Sets the value of the given attribute.
object.setAttribute ( "sName", vValue, [ iFlags ] )
sName |
Required. String specifying the name of the attribute. |
vValue |
Required. String, number, or Boolean value to assign to the attribute. |
iFlags |
Optional. One or more of the following flags may be specified:
0 |
When the attribute is set, it should overwrite any attributes with the same name, regardless of their case. |
1 |
The case of the attribute should be respected when it is set on the object. | |
No return value.
If the attribute is not already present, the method adds the attribute to the object and sets the value. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter.
Be careful when spelling attribute names. If iFlags is set to 1 and sName does not have the same uppercase and lowercase letters as the attribute, a new attribute is created for the object.
getAttribute