LearnFast.Ninja

JavaScript noscript tag in head and in body test on chrome tutorial example

On body tag write the noscript tag. Add java script alert for testing javascript. Note If you really want you can put the noscript tag at the head and get the same result... Disable java script on chrome. Run your page. See the result without JavaScript and with JavaScript.

Step 1: On body tag write the noscript tag. Add java script alert for testing JavaScript. 

<html>

<head>

    <title>noscript test</title>

</head>

<body>

    <noscript>

        This page requiers JavaScript.<br />

    </noscript>

    This is normal text.

 <script type="text/javascript">

     alert('Test JavaScript');

 </script>

</body>

</html>


Note: If you really want you can put the noscript tag at the head and get the same result... 


Step 2: Disable JavaScript on chrome.




Step 3: Run your page. 

Result without JavaScript: 


Result with JavaScript:


Tags

javascript

noscript