/
onchange event
onchange event
The onchange event activates when the value of an input element has changed. The event can be specified as a JavaScript expression or the name of a JavaScript function.
If an expression is used, the JavaScript keyword this refers to the element; this.value can retrieve the new value.
If the name of a function is used, the function will receive 2 parameters when called:
The browser event object
A reference to the element
Example:
The following can be placed on a Slider widget to display the slider's value within a nearby Label widget.
onchange: changeElementValue("Label1", this.value);