HTML DOM name ÊôÐÔ

¶¨ÒåºÍÓ÷¨

name ÊôÐÔ¿ÉÉèÖûò·µ»ØÈ·Èϰ´Å¥µÄÃû³Æ¡£

Óï·¨

submitObject.name=name

ʵÀý

ÏÂÃæµÄÀý×Ó¿ÉÏÔʾ³ö¸ÃÈ·Èϰ´Å¥µÄÃû³Æ£º

<html>
<body>

<form>
<input type="submit" id="submit1" name="submit1" />
</form>

<p>The name of the submit button is:
<script type="text/javascript">
x=document.getElementById('submit1');
document.write(x.name);
</script></p>

</body>
</html>
VUE