Hidden

An invisible form element that can store values on a web page without the visitor seeing them; useful for sending secret information to a CGI script.

Properties

name

FF, IE 3

Name of a hidden element

value

FF, IE 3

Value of a hidden element

For example:

window.document.the_form.my_hidden.value = "a nice person";

will set the value of the hidden element named my_hidden to a nice person. If the form is subsequently sent to a CGI script, the value will be passed along.

Get The Book of JavaScript, 2nd Edition 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.