HTML DOM alt ÊôÐÔ
¶¨ÒåºÍÓ÷¨
alt ÊôÐÔÉèÖûò·µ»ØÔÚä¯ÀÀÆ÷²»Ö§³ÖÃÜÂëÓòʱÏÔʾµÄÌæ´úÎı¾¡£
Óï·¨
passwordObject.alt=alternate_text
ʵÀý
ÏÂÃæµÄÀý×Ó¿É·µ»ØÃÜÂëÓòµÄÌæ´úÎı¾£º
<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>