//用href跳转 window.location.href = "https://www.cnblogs.com/lyso"; //用http的重定向来跳转 window.location.replace("https://www.cnblogs.com/lyso"); //新窗口打开 window.open('https://www.cnblogs.com/lyso'); //返回上一页 window.history.back(-1);