• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 27. JavaScript and Client-Side C... > Simple JavaScript Program: Hello Wor...

Simple JavaScript Program: Hello World!

A popular example used for introducing a new language is the "Hello World!" program. This is perhaps the easiest program you could ever write. It simply displays the words "Hello World!" onscreen. Although terribly simple, it illustrates some introductory points of JavaScript. Listing 27.1 shows a sample "Hello World!" application.

Code Listing 27.1. The Hello World! Program in JavaScript

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JAVASCRIPT">
        document.write("Hello World!")
</SCRIPT>
</HEAD>
<BODY>
…
</BODY>
</HTML>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint