Search.../

value

Sets or gets an element's value. Maximum length is 120 characters. To reset the element, restoring any placeholder text, set the value property to null or undefined.

Note: Changing an element's value in code does not trigger an onChange event.

Type:

stringRead & Write

Was this helpful?

Get an element's value

Copy Code
1let myValue = $w("#myElement").value; // "option-1"
Set an element's value

Copy Code
1$w("#myElement").value = "option-1";