Thursday, February 28, 2013

Entering JavaScript

<html>
<head>
<title>JavaScript</title>

<!-- Link to external JavaScript code -->
<script language="javascript" src="location of js file"></script>

</head>

<body>


<!-- Link to external JavaScript code - bottom of body for delayed load -->
<script language="javascript" src="location of js file"></script>

<script language="javascript" type="text/javascript>
  <!-- For browsers that do not understand js, treat js code as comment
     // JavaScript code here
     function displayMsg()
    {
      alert("Hello World!")
     }
  -->
</script>

  <noscript>
       <h1>JavaScript support is required</h1>
  </noscript>
</body>

</html>