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 use cursor triggers in MySQL

cursor The set of rows returned by the select que...

How to use Docker to build enterprise-level custom images

Preface Before leaving get off work, the author r...

Example of building a redis-sentinel cluster based on docker

1. Overview Redis Cluster enables high availabili...

How to use the concat function in mysql

As shown below: //Query the year and month of the...

Steps to purchase a cloud server and install the Pagoda Panel on Alibaba Cloud

Alibaba Cloud purchases servers Purchase a cloud ...

Summary of MySQL5 green version installation under Windows (recommended)

1 Download MySQL Download address: http://downloa...

Detailed explanation of viewing and setting file permissions on Mac

Preface To modify file permissions in the termina...

How to turn a jar package into a docker container

How to turn a jar package into a docker container...

Mini Program to Implement Sieve Lottery

This article example shares the specific code of ...

Hyper-V Introduction and Installation and Use (Detailed Illustrations)

Preface: As a giant in the IT industry, Microsoft...

5 common scenarios and examples of JavaScript destructuring assignment

Table of contents Preface 1. Extract data 2. Alia...

What should I do if I can't view the source file of a web page?

Q: Whether using Outlook or IE, when you right-cl...

Summary of Mysql common benchmark commands

mysqlslap Common parameter description –auto-gene...