HTML DOM alt Property
Complete Password Object Reference
Definition and Usage
The alt property sets or returns an alternate text to display if a browser
does not support password fields.
Syntax
passwordObject.alt=alternate_text
|
Example
The following example returns the alt text for a password field:
<html>
<body>
<form>
<input type="password" alt="Password field" id="pwd1" />
</form>
<p>The alt text for the password field is:
<script type="text/javascript">
x=document.getElementById('pwd1');
document.write(x.alt);
</script></p>
</body>
</html>
|
Try-It-Yourself Demos
Return
the alt text for a password field
Complete Password Object Reference
|