Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Hidden value property

Hidden value property

Hidden Object Reference Hidden Object


Definition and Usage

The value property sets or returns the value of the value attribute of the hidden input field.

The value property defines the default value of the hidden field.

Syntax

Set the value attribute:

hiddenObject.value="

value

"

Return the value attribute:

hiddenObject.value


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the value property.


Example

Example

The following example gets the value of the hidden field:

Runoob Tutorial(runoob.com)

Try it »


Hidden Object Reference Hidden Object