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

Q&A

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.
Q3:Can I make scripts that work on both Netscape and Internet Explorer?
A3: Yes, but it isn't always easy. Some JavaScript commands are supported by both browsers, and if you carefully test a simple 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. JavaScript can detect the browser and then run the code for the appropriate browser.
Q4:What about supporting different versions of Netscape?
A4: If you don't specify a version number in the <script> tag, you can write simple scripts that will run in Netscape 2.0 and later versions. In this case you will need to stick to the features of JavaScript 1.0.
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.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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