JavaScript (Cont.)


What Can a JavaScript Do? How to Put a JavaScript into an HTML Page

The HTML <script> tag is used to insert a JavaScript into an HTML page. The code will produce this output on an HTML page: “Hello, World!”
 <html><body>
  <script type="text/javascript">
   document.write( "Hello, World!" )
  </script>
 </body></html>

Demonstration