HomeJavaScriptJavaScript Tutorial #5 – NoScript Block

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>
<html>
<head>
    <meta charset="utf-8" />
    <title>Ginktage.com Home Page</title>
    <script language="javascript" type="text/javascript">
        document.write('Welcome to Ginktage.com JavaScript Tutorial');
        // This is single line comment
        /* This is a multi line comment 1
        This is a multi line comment 2
        */
    </script>
    <noscript>
        Sorry !!! You dont have JavaScript enabled on your browser.
    </noscript>
</head>
<body>
</body>
</html>

Leave a Reply

You May Also Like

You might want to filter an array in JavaScript by passing the filter criteria and return the filtered array. In...
You can flatten a 2-D array in JavaScript using the concat and apply method as shown in the below code...
Assume that you have an angle in degree and you wish to convert it to radians in JavaScript so that...