Input Hidden form Attribute

Definition and Usage

form The property returns a reference to the form containing the hidden input field.

This property returns the form object on success.

Note:This property is read-only.

Example

Return the id of the form containing the <input type="hidden"> element:

var x = document.getElementById("myInput").form.id;

Prøv det selv

Syntaks

hiddenObject.form

Tekniske detaljer

Returværdi:

En reference til formularelementet, der indeholder det skjulte inputfelt.

Hvis det skjulte inputfelt ikke er i formularen, returneres null.

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support