Body vLinkProperty

Body 对象参考手册Body Object

Definition and Usage

The vLink property can set or return the value of the vlink attribute of the body element.

The vlink attribute describes the color of visited link text.

Syntax

Set the vLink property:

bodyObject.vLink="color"

Return the vLink property:

bodyObject.vLink

Value Description
color Specifies the link color. See the completeCSS color values


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the vLink property


Example

Example

Return the color values of the page's unvisited, active, and visited link text:

<p><a href="//www.exampleb.com">Example</a></p> <p><a href="//www.exampleb.com/html/">HTML Tutorial</a></p> <script>document.write("Unvisited link color is: ") document.write(document.getElementById("example").link); document.write("<br>Active link color is: ") document.write(document.getElementById("example").aLink); document.write("<br>Visited link color is: ") document.write(document.getElementById("example").vLink);</script>

Try it Yourself »


Body 对象参考手册Body Object Other Extensions