setAttribute method
The setAttribute()
method of the Element
interface sets the value
of an attribute on the specified element. If the attribute already exists,
the value is updated; otherwise a new attribute is added with the
specified name and value.
To get the current value of an attribute, use Element.getAttribute
; to
remove an attribute, call Element.removeAttribute
.
If you need to work with the Attr
node (such as cloning from another
element) before adding it, you can use the Element.setAttributeNode
method instead.
Implementation
external void setAttribute(
String qualifiedName,
String value,
);