value 属性设置或返回显示在按钮上的文本。
buttonObject.value=value
下面的例子可返回显示在按钮上的文本:
<HTML>
<body>
<input type="button" id="button1" name="button1" value="Click Me!" />
<p>The text on the button is:
<script type="text/JavaScript">
x=document.getElementById('button1');
document.write(x.value
);
</script></p>
</body>
</html>
如对本文有疑问,请提交到交流凤凰娱乐开户注册,广大热心网友会为你解答!! 点击进入凤凰娱乐开户注册