HTML DOM Hidden Object
Hidden Object
The Hidden object represents a hidden input field in an HTML form.
This type of input element is actually hidden. The value attribute of this invisible form element holds an arbitrary string to be submitted to a Web server. Use this type of element when you want to submit data that is not entered directly by the user.
In an HTML form, a Hidden object is created each time a tag appears.
You can access a hidden input field by traversing the form's elements[] array or by using document.getElementById().
Hidden Object Properties
W3C: W3C standard.
| property | Description | W3C |
|---|---|---|
| form | Returns a reference to the form containing the hidden field. | Yes |
| name | Sets or returns the name of the hidden field. | Yes |
| type | Returns the form type of the hidden input field. | Yes |
| value | Sets or returns the value of the value attribute of the hidden field. | Yes |
Standard properties and events
The Hidden object also supports standard property and Events.