HTML DOM alt ÊôÐÔ

¶¨ÒåºÍÓ÷¨

alt ÊôÐÔ¿ÉÉèÖûò·µ»Øä¯ÀÀÆ÷²»Ö§³ÖÒþ²ØÓòʱÏÔʾµÄÎı¾¡£

Óï·¨

hiddenObject.alt=alternate_text

ʵÀý

ÏÂÃæµÄÀý×Ó·µ»ØÁËÒþ²ØÊäÈëÓòµÄ alt Îı¾£º

<html>
<body>

<form>
<input type="hidden" alt="Hidden field" id="hidden1" />
</form>

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

</body>
</html>
VUE