HTML DOM Ukryte Rodzaj nieruchomości
Definicja i Wykorzystanie
Właściwość type zwraca typ elementów formularza.
Do ukrytego obiektu, atrybut jest zawsze "ukryty".
gramatyka
hiddenObject.type
Pomoc Browser
Wszystkie główne przeglądarki obsługują typ atrybutu
Przykłady
Przykłady
Poniższy przykład zwraca typ pola Element formy ukryte:
<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>
Spróbuj »
ukryte obiekty