ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: HTML DOM nameÊôÐÔ

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

HTML DOM nameÊôÐÔ


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:1420 :: ::

Definition and Usage

The name property sets or returns the name of a button.

Syntax

buttonObject.name=name


Example

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>


Try-It-Yourself Demos

Return the name of a button

ÆÀÂÛ (0) All