Javascript : Hello World




To contact us



[
HOME] Consulting Design Maintenance Project Testing Training Turnkey Java C++ SQL HTML JavaScript ]

© 2002 - 2014 All Rights Reserved Total Application Works


  • Tell a friend about this site (copy and paste the following HTML page into a file (e.g., using Notepad).)
    <html>
    <title>Example of a link </title>
    <body>
    <table border>
    <a href="http://sumtotalz.com/TotalAppsWorks/Javascript/Helloworld.html">
    Hello World </a>
    </table>
    </body>
    </html>

JavaScript Table of Contents





How to write a Hello World Javascript program

The purpose of this tutorial is to show you how to write a first JavaScript program that we will call "Hello World!" What is Javascript? JavaScript is a scripting language that is frequently used for client-side web programming. This tutorial assumes that you have mastered the basics of HTML. In the following example, we will show you the code for our Hello World! program.

<html>
<body>
<script language=javascript>
//Indicates that the language is javascript
document.write("Hello World!"); //This line prints Hello World!
//end JavaScript Code
</script>
</body>
</html>
Figure 1: Javascript Example of Hello World!


  1. <script language=javascript> - means that we will be using the javascript language
  2. document.write("Hello World!") - means that we will write Hello World! to the screen
  3. </script> - means that this ends the javascript portion of our program
When Figure 1 is displayed by your browser, it looks like:

Figure 2: Hello World! Example as displayed by Your Browser


Feel free to copy and paste the code in Figure 1 into a source file.










HOME] Consulting Design Maintenance Project Testing Training Turnkey Java C++ SQL HTML JavaScript ]


To contact us

© 2002 - 2014 All Rights Reserved Total Application Works