js中页面跳转几种方法

<script>
  function toLogin(){

  //第一种
    //self.location="/zhld/toTestLogin";

  //第二种
    top.location="/zhld/toTestLogin";

  //第三种
    //window.navigate="/zhld/toTestLogin";

  //第四种
    //window.location.href="/zhld/toTestLogin";
}
</script>

原文地址:https://www.cnblogs.com/wmcoder/p/5952948.html