"; 2. In JavaScript, you can use the href attribute of the location object to jump, with the syntax "window.location. href=page address"."/> "; 2. In JavaScript, you can use the href attribute of the location object to jump, with the syntax "window.location. href=page address".">

Home>Article>Web Front-end> How to jump to the page using html/JavaScript

How to jump to the page using html/JavaScript

青灯夜游
青灯夜游 Original
2021-04-12 17:54:14 3236browse

How to jump to the page: 1. In HTML, you can use the meta tag to jump, with the syntax " "; 2. In JavaScript, you can use the href attribute of the location object to jump, with the syntax "window. location.href=Page address".

How to jump to the page using html/JavaScript

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

html/JavaScript to achieve page jump

1. Use meta to jump in html. You can set the jump time and page through meta

     

2. Jump to the previous page through javascript

1 // 直接跳转 2 window.location.href='//m.sbmmt.com/m/faq/index.html'; 3 // 定时跳转 4 setTimeout("javascript:location.href='//m.sbmmt.com/m/faq/index.html'", 5000);

html

window.history.go(-1); or window.history .back(-1);

Write in html

返回上一页 返回上一页

[Recommended learning:javascript advanced tutorial]

The above is the detailed content of How to jump to the page using html/JavaScript. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn