指定文字或連結的顏色
document.alinkColor
document.bgColor
document.fgColor
document.linkColor
document.vlinkColor
可指定文字或連結的顏色
程式碼如下:
<script>
document.alinkColor = "#000000";
document.bgColor = "#00ffff";
document.fgColor = "white";
document.linkColor = "green";
document.vlinkColor = "#ffff00";
</script>
<a href = "test1.html">Linking to first page...</a>
<br>
<a href = "test2.html">Linking to second page...</a>
<br>
<a href = "test3.html">Linking to third page...</a>