HTML DOM type ÊôÐÔ

¶¨ÒåºÍÓ÷¨

type ÊôÐÔ·µ»ØÎı¾ÓòµÄ±íµ¥ÔªËØÀàÐÍ¡£¶ÔÓÚÎı¾Óò£¬¸ÃÊôÐÔ×ÜÊÇ·µ»Ø "text"¡£

Óï·¨

textObject.type

ʵÀý

ÏÂÃæµÄÀý×Ó·µ»ØÁËÎı¾ÓòµÄ±íµ¥ÔªËØÀàÐÍ£º

<html>
<body>

<form>
<input type="text" id="text1" />
</form>

<script type="text/javascript">
x=document.getElementById("text1");
document.write("Form element type is: ");
document.write(x.type);
</script>

</body>
</html>
VUE