Properti HTML DOM Tubuh Vlink
Definisi dan Penggunaan
Vlink set properti atau mengembalikan nilai properti elemen vlink tubuh.
Atribut vlink menggambarkan warna link teks diklik.
tatabahasa
Pengaturan properti Vlink:
bodyObject.vLink="color"
Kembali sifat Vlink:
bodyObject.vLink
值 | 描述 |
---|---|
color | 指定链接颜色。查看完整的 CSS 颜色值 |
Dukungan Browser
Semua browser utama mendukung properti Vlink
contoh
contoh
Klik pada link dan kembali ke halaman setelah menekan nilai warna teks:
<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>
Coba »
tubuh Object