Document Link color : document « Javascript Objects « JavaScript DHTML






Document Link color

 
    
<html>
<body onload="document.body.link = 'blue';">
<script language="JavaScript">
function function1() {
    document.linkColor = "green";
}
</script>
<a href="http://www.java2s.com">java2s.com Web page</a>
<input type="button" value="Change the link color to green" onClick="function1();">
</body>
</html>

    
      
        
  








Related examples in the same category

1.'expando' Example
2.Active Element
3.Document 'URLUnencoded' Example
4.'URL' Example
5.Create a Comment
6.'write()' Example
7.'writeln()' Example
8.Execute Command
9.Document parentWindow
10.Document referrer
11.Document compatMode
12.Document design Mode
13.Document doctype
14.Document Domain
15.Document title Example
16.Use document.links collection
17.Print page out
18.Expose the prperties of Objects