- ·上一篇文章:currentTarget 事件属性
- ·下一篇文章:key 事件属性
当前位置:K88软件开发 → 文章中心 → 编程语言 → JavaScript → JS02 → 文章内容
HTML DOM Body aLink 属性
由 叫我周泡泡 创建,?﹏???ζ???﹏﹏? 最后一次修改 2016-11-25 Body aLink 属性 Body 对象定义和用法 aLink 属性可设置或者返回 body 元素中 alink 属性的值。 alink 属性指定了文档链接点击时的颜色 (链接被点击时)。语法设置 aLink 属性:bodyObject.aLink="color"返回 aLink 属性:bodyObject.aLink值描述color指定了链接颜色。查看完整的 CSS 颜色值浏览器支持 所有主要浏览器都支持 aLink 属性实例实例返回页面链接,链接点击时,链接点击后的颜色值:<html><body id="w3s" link="blue" alink="green" vlink="red"><p><a href="http://www.k88.net">W3CSchool.cn</a></p><p><a href="//www.k88.net/html/">HTML Tutorial</a></p><script>document.write("Link color is: ")document.write(document.getElementById("w3s").link);document.write("<br>Active link color is: ")document.write(document.getElementById("w3s").aLink);document.write("<br>Visited link color is: ")document.write(document.getElementById("w3s").vLink);</script></body></html>尝试一下 ? Body 对象
HTML DOM Body aLink 属性