Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web
Expertise: Beginner
Sep 29, 1998



Building the Right Environment to Support AI, Machine Learning and Deep Learning

JavaScript On or Off?

When using JavaScript in your Web pages, you should keep in mind that a user's browser might not support JavaScript. This could either be because the browser is old or because the user disabled JavaScript. Either way, the <NOSCRIPT> tag provides a solution. Any HTML enclosed between <NOSCRIPT> and </NOSCRIPT> will only be displayed if JavaScript is unavailable. This solution works in Navigator 1.22 as well as 3.0 and above, but not in Navigator 2.x.

You can also alert users that JavaScript is required and provide them with help on either downloading a compatible browser or re-enabling JavaScript support. One solution is to include a <META REFRESH> tag inside a set of <NOSCRIPT> tags in the <HEAD> portion of the page, which will re-direct users without JavaScript (and those using Navigator 2.02) to a different page.

<SCRIPT LANGUAGE="Javascript">
document.write("JavaScript is on!");
This document requires JavaScript. If JavaScript is unavailable you'll be 
automatically re-directed to an alternate page.
Boris Feldman
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date