:: Documentation >>

setProperty

Assigns property value.

null

Syntax

obj.setProperty(name, value);

Parameters

name (string) - property name
value (any) - property value

Example

obj.defineProperty("color", "black");
obj.setProperty("color", "red"); // set the value of the 'color' property
obj.setColor("red"); // does the same thing

See also

defineProperty, getProperty methods

Comments

setting array element value for defined property Gianni Luppi (1)

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