跳转链接 在当前窗口打开
window.location.href=
"http://www.baidu.com"
等价于 <a href=
"baidu.com"
target=
"_self"
>go baidu</a>
跳转链接 在新窗口打开
window.open(
"http://www.baidu.com"
) 等价于 <a href=
"baidu.com"
target=
"_blank"
>go baidu</a>
跳转链接 返回上一页
window.history.back(-1);
跳转链接
self.location.href=
"baidu.com"