How to detect if JavaScript is disabled in a browser?
Answers
Answered by
0
To detect if JavaScript is disabled in a web browser, use the <noscript> tag. The HTML <noscript> tag is used to handle the browsers, which do recognize <script> tag but do not support scripting. This tag is used to display an alternate text message.
Here’s an example,
<!DOCTYPE html>
<html>
<head>
<title>HTML noscript Tag</title>
</head>
<body>
<script>
<!--
document.write("Hello JavaScript!")
-->
</script>
<noscript>
Your browser does not support JavaScript!
</noscript>
</body>
</html>
mark it as a brainlist
Here’s an example,
<!DOCTYPE html>
<html>
<head>
<title>HTML noscript Tag</title>
</head>
<body>
<script>
<!--
document.write("Hello JavaScript!")
-->
</script>
<noscript>
Your browser does not support JavaScript!
</noscript>
</body>
</html>
mark it as a brainlist
Similar questions
Math,
6 months ago
Political Science,
6 months ago
Biology,
6 months ago
Computer Science,
1 year ago