alt 属性可设置或返回在浏览器不支持单选按钮时显示的替代文本。
radioObject.alt=alternate_text
下面的例子可返回单选按钮的 alt 文本:
<html> <body> <form> Male: <input id="male" alt="male" type="radio" name="Sex" value="Male" /> <br /> Female: <input id="female" alt="female" type="radio" name="Sex" value="Female" /> </form> <p>The alt text for the radio buttons are: <script type="text/javascript"> document.write(document.getElementById('male').alt
); document.write(" and "); document.write(document.getElementById('female').alt
); </script></p> </body> </html>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号