3 codes for automatic refresh of web pages

3 codes for automatic refresh of web pages
In fact, it is very simple to achieve this effect, and this effect cannot even be called a special effect. All you have to do is add the following code to your web page.

1. Automatic page refresh: Add the following code to the <head> area

<meta http-equiv="refresh" content="20">, where 20 means refreshing the page every 20 seconds.

2. Automatic page jump: Add the following code to the <head> area

<meta http-equiv="refresh" content="20;url=https://www.jb51.net">, where 20 means jumping to https://www.jb51.net page after 20 seconds

3. Page automatic refresh js version

<script language="JavaScript">
function myrefresh(){
window.location.reload();
}
setTimeout('myrefresh()',1000); //Specify refresh once every 1 second
</script>

<<:  Ten popular rules for interface design

>>:  Introduction to using the MySQL mysqladmin client

Recommend

How to open external network access rights for mysql

As shown below: Mainly execute authorization comm...

The principle and implementation of two-way binding in Vue2.x

Table of contents 1. Implementation process 2. Di...

How to prevent Vue from flashing in small projects

Summary HTML: element plus v-cloak CSS: [v-cloak]...

How to install redis in Docke

1. Search for redis image docker search redis 2. ...

Detailed explanation of how to reduce memory usage in MySql

Preface By default, MySQL will initialize a large...

How to completely delete the MySQL service (clean the registry)

Preface When installing the executable file of a ...

Detailed steps for deepin20 to install NVIDIA closed-source drivers

Step 1: Install the deep "graphics driver&qu...

Detailed explanation of the role of static variables in MySQL

Detailed explanation of the role of static variab...

Four ways to compare JavaScript objects

Table of contents Preface Reference Comparison Ma...

Solution to many line breaks and carriage returns in MySQL data

Table of contents Find the problem 1. How to remo...

jQuery implements form validation function

jQuery form validation example / including userna...