Sams Teach Yourself JavaScript in 24 Hours

Sams Teach Yourself JavaScript in 24 Hours

By Michael Moncur

Quiz

Test your knowledge of cross-browser scripting in JavaScript by answering the following questions.

Questions

1:

Which of the following navigator object properties is the same in both Netscape and IE?

  1. navigator.appCodeName
  2. navigator.appName
  3. navigator.appVersion
A1:

a. The navigator.appCodeName property is the same ("Mozilla") in the latest Netscape and Microsoft browsers.

2:

Which of the following is something you can't do with JavaScript?

  1. Send users of Netscape to a different page.
  2. Send users of IE to a different page.
  3. Send users of non-JavaScript browsers to a different page.
A2:

c. You can't use JavaScript to send users of non-JavaScript browsers to a different page because the script won't be executed at all.

3:

What does the <noscript> tag do?

  1. Encloses text to be displayed by non-JavaScript browsers.
  2. Prevents scripts on the page from executing.
  3. Describes certain low-budget movies.
A3:

a. The <noscript> tag encloses text to be displayed by non-JavaScript browsers.

Share ThisShare This

Informit Network