HTML DOM Hidden type property
Definition and Usage
type property returns the type of form elements.
For the hidden object, the attribute is always "hidden".
grammar
hiddenObject.type
Browser Support
All major browsers support attribute type
Examples
Examples
The following example returns the type of the form element hidden field:
<html>
<head>
<script>
function displayResult()
{
var x=document.getElementById("hidden1").type;
alert(x);
}
</script>
</head>
<body>
<form>
<input type="hidden" id="hidden1">
</form>
<button type="button" onclick="displayResult()">Display input type</button>
</body>
</html>
<head>
<script>
function displayResult()
{
var x=document.getElementById("hidden1").type;
alert(x);
}
</script>
</head>
<body>
<form>
<input type="hidden" id="hidden1">
</form>
<button type="button" onclick="displayResult()">Display input type</button>
</body>
</html>
try it"
Hidden Objects