HTML DOM Type 屬性
定義和用法
type 屬性可返回表單元素的類型。對(duì)于 hidden 對(duì)象,該屬性總是 "hidden"。
語(yǔ)法
hiddenObject.type
實(shí)例
下面的例子返回了該隱藏域的表單元素類型:
<html>
<body>
<form>
<input type="hidden" id="hidden1" />
</form>
<script type="text/javascript">
x=document.getElementById("hidden1");
document.write("Form element type is: ");
document.write(x.type
);
</script>
</body>
</html>