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

Chapter 2. Creating Your First Scripts > Basic Script Construction

Basic Script Construction

With your text editor and browser (or browsers) running, you're ready to start scripting. This section describes the standard procedure for constructing and testing a script. You'll see a working example that you can try out, and later you'll move on to other examples that illustrate some JavaScript techniques that you'll use throughout this book.

The <script> Tag

The basic container for a script is, naturally enough, the HTML <script> tag and its associ ated </script> end tag. For a simple script, the tag is embellished with both the language attribute, which is set to the value "JavaScript", and the type attribute, which is set to "text/javascript":


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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