HTML DOM id ÊôÐÔ

¶¨ÒåºÍÓ÷¨

id ÊôÐÔ¿ÉÉèÖûò·µ»ØÒþ²ØÊäÈëÓòµÄ id¡£

Óï·¨

hiddenObject.id=id

ʵÀý

ÏÂÃæµÄÀý×Ó¿ÉÈ¡µÃÒþ²ØÊäÈëÓòµÄ id£º

<html>
<body>

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

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

</body>
</html>
VUE