HTML DOM alt ÊôÐÔ

¶¨ÒåºÍÓ÷¨

alt ÊôÐÔ¿ÉÉèÖûò·µ»ØÔÚä¯ÀÀÆ÷²»Ö§³ÖÖØÖð´Å¥Ê±ÏÔʾµÄÌæ´úÎı¾¡£

Óï·¨

resetObject.alt=alternate_text

ʵÀý

ÏÂÃæµÄÀý×Ó¿É·µ»ØÖØÖð´Å¥µÄ alt Îı¾£º

<html>
<body>

<form>
<input type="reset" alt="Reset button" id="reset1" />
</form>

<p>The alt text for the reset button is:
<script type="text/javascript">
x=document.getElementById('reset1');
document.write(x.alt);
</script></p>

</body>
</html>
VUE