Hidden.value

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

							hidden.value

Description

The value property of the hidden object reflects the HTML VALUE attribute of the Hidden object.

Example

Listing 7.292 shows how the value property of the Hidden object is used. The onClick event handler is used to display an alert box to the user indicating the value of the Hidden object.

Listing 7.292 Using the value Property of Hidden Object
 <html> <head> <title> Using the value property of the Hidden Object</title> </head> <body> <form name="form1"> Form name:<input type="hidden" name="hide1" value="Test"> <p> <input type="button" value="Get Hidden Value" onClick='alert("The Hidden object value is: " + form1.hide1.value)'> </form> </body> ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.