The setAttribute method sets the value of a specified attribute. You invoke this method on an element, passing it the name of an attribute, a new value for the attribute, and an optional case argument, which, if true, makes the browser search for the attribute in a case-sensitive way. You can see the support for this method in Table 6.48.
Method | NS2 | NS3 | NS4 | NS6 | IE3a | IE3b | IE4 | IE5 | IE5.5 | IE6 |
---|---|---|---|---|---|---|---|---|---|---|
setAttribute(attribute, value [, case]) | ||||||||||
x | x | x | x | x | ||||||
No return value |