Foreground Color Example : Color « Style Layout « JavaScript DHTML






Foreground Color Example

  
    
<html>
<body>
Sample Text
<br>
<button onclick="document.fgColor='red';">Red</button>
<button onclick="document.fgColor='blue';">Blue</button>
</body>
</html>

    
      
        
    
  








Related examples in the same category

1.Body text Color
2.'color' Example
3.Change text color
4.Change element color
5.div.style.color="#fff";
6.Assign random color to