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


Q1: If I plan to learn Java or CGI anyway, will I have any use for JavaScript?
A1: Certainly. JavaScript is the ideal tool for many applications, such as form validation. While Java and CGI have their uses, they can't do all that JavaScript can do.
Q2:Can a Web page include more than one set of <script> tags?
A2: Yes. In fact, the larger scripts in this book will often include two or more script sections. You can also include <script> tags that include JavaScript code and <script> tags that reference external JavaScript files in the same HTML file.
Q3:Can I make scripts that work on both Netscape and Internet Explorer?
A3: Yes, but it isn't always easy. Most JavaScript features are supported by both browsers, and if you carefully test your script on both browsers, you can make it work. For more complex scripts, you may need to use different sections of code for each browser. See Hour 14, “Creating Cross-Browser Scripts,” for details.
Q4:What about supporting different versions of Netscape or Internet Explorer?
A4: If you don't specify a JavaScript version in the <script> tag, you can write simple scripts that will run in Netscape 2.0 and later or Internet Explorer 3.0 and later. In this case you will need to stick to the features of JavaScript 1.0 whenever possible.
Q5:What happens if a user's browser doesn't support JavaScript at all?
A5: You can use HTML comments to prevent older browsers from displaying JavaScript code. This is explained in Hour 2.



Not a subscriber?

Start A Free Trial

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