Sams Teach Yourself JavaScript in 24 Hours

Sams Teach Yourself JavaScript in 24 Hours

By Michael Moncur

Beginning the Script

Your script, like most JavaScript programs, begins with the HTML <script> tag. As you learned in Hour 1, you use the <script> and </script> tags to enclose a script within the HTML document.

To begin creating the script, open your favorite text editor and type the beginning and ending <script> tags, as shown below.

<script LANGUAGE="JavaScript" type="text/javascript">
</script>

Since this script does not use any of the new features of JavaScript 1.1 or later, you won't need to specify a version number in the <script> tag. This script should work in Netscape 2.0 and later or Internet Explorer 3.0 or later.

Share ThisShare This

Informit Network