JS有哪些跳转页面方法(8种跳转方法)

2025年01月25日 建站教程

JS有哪些跳转页面方法,下面web建站小编给大家简单介绍一下8大跳转方法!

8种跳转方法介绍:

//直接打开(推荐)
window.location.href="https://lmcjl.com/"

//新窗口打开
window.open('https://lmcjl.com/')

//仅支持IE
window.navigate("https://lmcjl.com/");

//返回
window.history.back(-1);

//只刷新不跳转
<meta http-equiv="refresh" content="5">
//定时跳转
<meta http-equiv="refresh" content="5;url=index.html"> 

//其它方法
window.location.replace("https://lmcjl.com/");
self.location='https://lmcjl.com/';
top.location='https://lmcjl.com/';

本文链接:http://so.lmcjl.com/news/22006/

展开阅读全文
相关内容