Get the value of the value attribute of a hidden input field:
The result of x will be:
The value property sets or returns the value of the value attribute of the hidden input field.
The value attribute defines the default value of the hidden input field.
The value property is supported in all major browsers.
Return the value property:
Set the value property:
Value | Description |
---|---|
text | Specifies the initial (default) value of the input field |
Return Value: | A String, representing the value of the value attribute of the hidden input field |
---|
Change the value of the hidden field:
Submitting a form - How to change the value of the hidden field:
HTML reference: HTML <input> value attribute