//新开页面的跳转
window.open("https://XXX","_blank")
//和这个html等价
<a href="https://XXX" target="_blank">点击跳转</a>
//当前窗口打开
window.location.href="https://XXX"
//和这个html等价
<a href="https://XXX" target="_self">点击跳转</a>
//返回上一页
window.history.back(-1);
js点击链接跳转
猜你喜欢
转载自blog.csdn.net/weixin_45288172/article/details/130214578
今日推荐
周排行