HTML DOM Body vLink property
Definition and Usage
vLink property sets or returns the property value vlink body element.
vlink attribute describes the clicked link text color.
grammar
Setting vLink properties:
bodyObject.vLink="color"
Back vLink properties:
bodyObject.vLink
值 | 描述 |
---|---|
color | 指定链接颜色。查看完整的 CSS 颜色值 |
Browser Support
All major browsers support vLink property
Examples
Examples
Click on the link and return to the page after clicking the color value of the text:
<html>
<body id="w3s" link="blue" alink="green" vlink="red">
<p><a href="http://www.w3cschool.cc">W3CSchool.cc</a></p>
<p><a href="http://www.w3cschool.cc/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 id="w3s" link="blue" alink="green" vlink="red">
<p><a href="http://www.w3cschool.cc">W3CSchool.cc</a></p>
<p><a href="http://www.w3cschool.cc/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>
try it"
Body Object