HTML DOM alt ÊôÐÔ

¶¨ÒåºÍÓ÷¨

form ÊôÐÔ¿É·µ»Ø¶Ô°üº¬Òþ²ØÊäÈëÓòµÄ±íµ¥¶ÔÏóµÄÒýÓá£

Óï·¨

hiddenObject.form

ʵÀý

ÏÂÃæµÄÀý×Ó·µ»ØÁ˸ÃÒþ²ØÊäÈëÓòËùÊôµÄ±íµ¥µÄ id£º

<html>
<body>

<form id="form1">
<input type="hidden" id="hidden1" />
</form>

<p>The id of the form containing the hidden element is: 
<script type="text/javascript">
x=document.getElementById('hidden1');
document.write(x.form.id);
</script></p>

</body>
</html>
VUE