Declaring a Function in the 'head' Block : Function : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » Function »

 

Declaring a Function in the 'head' Block



<html>
<head>
  <title>JavaScript Unleashed</title>
  <script type="text/javascript">
  <!--
    function defaultColors() {
      document.writeln("Inside of defaultColors()");
      document.fgColor = "black";
      document.bgColor = "white";    
    }
  // -->
  </script>
</head>
<body>
  <script type="text/javascript">
  <!--     
    document.writeln("Functions are scripts just waiting to run!");
    defaultColors();
    document.writeln("All done.");
  // -->
  </script>
</body>
</html>



           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» Function