当前位置: 首页 > 网络学院 > 客户端脚本教程 > HTML DOM > HTML DOM name属性
No. « ‹ 1 2 3 »
关键字
The name property sets or returns the name of a button.
buttonObject.name=name
The following example returns the name of a button:
<html><body>
<form><input type="button" id="button1"name="button1" value="Click Me!" /></form>
<p>The name of the button is: <script type="text/javascript">x=document.getElementById('button1');document.write(x.name);</script></p>
</body></html>
Return the name of a button
登陆 | 还没注册?