alt 属性可设置或返回当浏览器不支持按钮时要显示的替换文本。
buttonObject.alt=alternate_text
下面的例子可返回按钮的 alt 文本:
<html>
<body>
<form>
<input type="button" alt="Button" id="button1"
value="Click me" />
</form>
<p>The alt text for the button is:
<script type="text/javascript">
x=document.getElementById('button1');
document.write(x.alt
);
</script></p>
</body>
</html>