Introduction to the use of HTML element noscript

Introduction to the use of HTML element noscript

noscript definition and usage

The noscript element is used to define alternative content (text) when scripts are not executed.

This tag can be used with browsers that recognize the <script> tag but do not support the script within it.
Differences between HTML and XHTML
NONE
Tips and Notes:
Note: If the browser supports scripting, it will not display the text inside the noscript element.

Note: Browsers that do not recognize the <script> tag will display the content of the tag on the page. To prevent browsers from doing this, you should hide your script in comment tags. Older browsers (those that don't recognize <script> tags) will ignore comments and thus not write the tag's contents to the page, while newer browsers will know how to execute scripts even if they are surrounded by comment tags!

Global properties

The <noscript> tag supports global attributes in HTML.

example

JavaScript


Copy code
The code is as follows:

<body>
...
...</p> <p> <script type="text/javascript">
<!--
document.write("Hello World!")
//-->
</script>

<noscript>Your browser does not support javascript!</noscript>
...
...
</body>

VBScript


Copy code
The code is as follows:

<body>
...
...
<script type="text/vbscript">
<!--
document.write("Hello World!")
'-->
</script>

<noscript>Your browser does not support VBScript!</noscript>
...
...
</body>

<<:  Details of watch monitoring properties in Vue

>>:  Why is the MySQL auto-increment primary key not continuous?

Recommend

Detailed explanation of Java calling ffmpeg to convert video format to flv

Detailed explanation of Java calling ffmpeg to co...

TypeScript enumeration basics and examples

Table of contents Preface What are enums in TypeS...

HTML implements a fixed floating semi-transparent search box on mobile

Question. In the mobile shopping mall system, we ...

Detailed explanation of Svn one-click installation shell script under linxu

#!/bin/bash #Download SVN yum -y install subversi...

Solve the compatibility issue between MySQL 8.0 driver and Alibaba Druid version

This article mainly introduces the solution to th...

js+css to realize three-level navigation menu

This article example shares the specific code of ...

3 simple ways to achieve carousel effects with JS

This article shares 3 methods to achieve the spec...

Pure CSS to modify the browser scrollbar style example

Use CSS to modify the browser scroll bar style ::...

MySQL 8.0.13 installation and configuration tutorial under CentOS7.3

1. Basic Environment 1. Operating system: CentOS ...

How to migrate the data directory in Docker

Table of contents View Disk Usage Disk Cleanup (D...

Introduction to JavaScript strict mode use strict

Table of contents 1. Overview 1.1 What is strict ...

Vue implements page caching function

This article example shares the specific code of ...

MySQL time types and modes details

Table of contents 1. MySQL time type 2. Check the...