HTML DOM alt Property
Complete Text Object Reference
Definition and Usage
The alt property sets or returns an alternate text to display if a browser
does not support text fields.
Syntax
textObject.alt=alternate_text
|
Example
The following example returns the alt text for a text field:
<html>
<body>
<form>
Email: <input type="text" alt="Email input field" id="email" />
</form>
<p>The alt text for the text field is:
<script type="text/javascript">
x=document.getElementById('email');
document.write(x.alt);
</script></p>
</body>
</html>
|
Try-It-Yourself Demos
Return the
alt text for a text field
Complete Text Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|