Latest web development tutorials

Properti HTML DOM Tubuh alink

Referensi Obyek tubuh tubuh Object

Definisi dan Penggunaan

alink set properti atau mengembalikan nilai dari properti tubuh elemen alink.

atribut alink menentukan warna link dokumen saat diklik (link diklik).

tatabahasa

Pengaturan properti alink:

bodyObject.aLink="color"

Sifat Kembali alink:

bodyObject.aLink

描述
color 指定了链接颜色。查看完整的 CSS 颜色值


Dukungan Browser

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Semua browser utama mendukung properti alink


contoh

contoh

link halaman belakang, link diklik, klik nilai tautan warna:

<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 »


Referensi Obyek tubuh tubuh Object