By | July 28, 2013
The SRIPT element is used in the HTML file for using the JavaScript in the code. JavaScriptallows us to enhance the functionality of the HTML file. The NOSCRIPT element is used to display the alternate text on the browser that does not support scripts.
An HTML file named: “SCRIPT_NOSCRIPT.html” , Let’s understand the use of SCRIPT and NOSCRIPT  elements in HTML file.
Write the Code :

            <SCRIPT TYPE=”text/javascript”>
                        document.write(“Welcome in HTML World”)
                        JavaScript is disabled or not to your
Here Scripted text is “Welcome in HTML world”, If our Web browser supports JavaScript the it will show Welcome in HTML World otherwise it will display NOSCRIPT  Content.

Output When Browser JavaScript Supporting:
Now Disable the Java Script from your Browser(Google Chrome):
Steps for Disabling JavaScript from your Browser:
      1.      Click on Customize and control Google Chrome button at the top corner and select the “Setting” option       from the context menu.

After Clicking on setting option:

         After Clicking on setting option:

       2.      Select the Show advance Setting then Click on Privacy >> Content Setting :

1.      3.Select the Do Not allow any Site to Run JavaScript radio button in the JavaScript section to disable the JavaScript. 


 4.      Close the Setting page and Open the SCRIPT_NOSCRIPT.HTML file, Now it will show the content written in NOSCRIPT Element. “JavaScript is disabled or not to your  Browser.”

Leave a Reply

Your email address will not be published. Required fields are marked *