HTML DOM alt Property
Complete Button Object Reference
Definition and Usage
The alt property sets or returns an alternate text to display if a browser
does not support buttons.
Syntax
buttonObject.alt=alternate_text
|
Example
The following example returns the alt text for a button:
<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>
|
Try-It-Yourself Demos
Return
the alt text for a button
Complete Button Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|