|
Answer» To find whether the web browser supports JavaScript or not, you can TEST it on your local system.
Create an HTML file and USE the <noscript> tag. Run the file in your browser and if it does not support JavaScript, then the message set under the <noscript> would be visible.
The <noscript> tag is used in JavaScript to allow adding an alternate message if JavaScript is disabled in the web browser. In this WAY a user can know whether the web browser has JavaScript or not. If it’s not there, then the message ADDED using the <noscript> is visible.
The following is an example: <!DOCTYPE html>
<html>
<head>
<title>HTML noscript</title>
</head>
<body>
<script>
<!--
document.write("This is demo text!")
-->
</script>
<noscript>
Your browser does not support JavaScript!
</noscript>
</body>
</html>The above code will allow the web browser that doesn't support JavaScript to display the text which we added under <noscript> tag i.e. "Your browser does not support JavaScript!".
|