HTML DOM 숨겨진 유형 등록
정의 및 사용
type 속성은 폼 요소의 유형을 반환합니다.
숨겨진 개체를 들어, 속성은 "숨겨진"항상.
문법
hiddenObject.type
브라우저 지원
모든 주요 브라우저 유형 속성 지원
예
예
다음은 폼 요소 숨겨진 필드의 형식을 반환합니다 :
<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>
»시도
숨겨진 개체