Js跳转网页的几种方法

1、利用location进行跳转

 <script language="javascript" type="text/javascript">
           window.location.href="XXX.asp?"+参数; 
    </script>

2、返回跳转

   <script language="javascript">
    alert("返回");
    window.history.back(-1);
   </script>

3、navigate跳转

 <script language="javascript">
    window.navigate("xxx.asp/html");
  </script>

4、self.location

<script language="JavaScript">
          self.location='xxx.asp/htm';
   </script>

5、top.location

<script language="javascript">
          alert("非法访问!");
          top.location='xxx.asp';
   </script>

 

 

posted @ 2012-10-24 09:23  win_and_first  阅读(765)  评论(0编辑  收藏  举报