:: Documentation >>

setAttribute

Sets the value of the html attribute.

null

Syntax

obj.setAttribute(name, value);

Parameters

name (string) - attribute name
value (string or function) - attribute value

Example

obj.setAttribute("title", "some text");

Remarks

The value parameter can be a function, which will be called each time the html is generated (in toString() or refresh() methods), for example

obj.setAttribute("value", function(){
    return this.getControlProperty("value");
});

See also

getAttribute() method

Comments

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5