Home>Article>Web Front-end> How to jump to the page using html/JavaScript
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".
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!