js跳转链接的几种方式

1、跳转链接,当前窗口打开

window.location.href="http://www.baidu.com"   等价于    <a href="baidu.com" target="_self">go baidu</a>  

2、跳转链接,新窗口打开

window.open("http://www.baidu.com")  等价于 <a href="baidu.com" target="_blank">go baidu</a>

3、跳转链接 返回上一页

window.history.back(-1);
原文地址:https://www.cnblogs.com/huihuihero/p/11693577.html