JavaScript Tutorial #5 – NoScript Block

If you are using JavaScript in your web application and you want to detect if JavaScript is disabled in the web browser and show error message accordingly.

In this case , you can add the <noscript> tag and show the warning message to the user accordingly.

<!DOCTYPE html>
    <meta charset="utf-8" />
    <title> Home Page</title>
    <script language="javascript" type="text/javascript">
        document.write('Welcome to JavaScript Tutorial');
        // This is single line comment
        /* This is a multi line comment 1
        This is a multi line comment 2
        Sorry !!! You dont have JavaScript enabled on your browser.
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply


Interesting BlogPosts to read

How to Flatten a 2-D array in JavaScript ?
You can flatten a 2-D array in JavaScript using the concat and apply method as shown in the below co...
How to convert from Degree to Radian in JavaScript ?
Assume that you have an angle in degree and you wish to convert it to radians in JavaScript so that ...
How to Prevent your App from being Installed on Windows Phone that does not match the requirements ?
There are times when you want to prevent your app from being downloaded and installed on the Windows...