Using Colors in JavaScript : Color « Development « JavaScript DHTML






Using Colors in JavaScript


<html>
<head>
  <title>JavaScript Unleashed</title>
</head>
<body>
   
  <h2>
    <script type="text/javascript">
    <!--
      document.writeln("crimson!".fontcolor("crimson"));
    // -->
    </script>
  </h2>
  <h4>
    <script type="text/javascript">
    <!--
      document.writeln("blue".fontcolor("blue"));
      document.writeln("<br>" + "#008000".fontcolor("#008000"));
    // -->
    </script>
  </h4></body>
</html>


           
       








Related examples in the same category

1.Code for the Actual JavaScript Code and Color Selectors
2.Using Color Attributes: how document colors can be changed
3.Using setInterval () to Repeatedly Change the Document Background Color
4.Color Sampler