alt 属性可设置或返回在浏览器不支持确认按钮时显示的替代文本。
submitObject.alt=alternate_text
下面的例子可返回确认按钮的 alt 文本:
<html>
<body>
<form>
<input type="submit" alt="submit button" id="submit1" />
</form>
<p>The alt text for the submit button is:
<script type="text/javascript">
x=document.getElementById('submit1');
document.write(x.alt
);
</script></p>
</body>
</html>