zoukankan      html  css  js  c++  java
  • javascript实现页面跳转

    因为要做登录,利用ajax在本界面做验证,然后跳转,所以在网上找到了以下内容,均属转载

    原文链接:http://www.68design.net/Development/JSP/39394-1.html

    第一种: 

    <script language="javascript" type="text/javascript">
    window.location.href="login.jsp?backurl="+window.location.href;
    </script>

    第二种:    

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

    第三种:   

    <script language="javascript"> 
    window.navigate("top.jsp");  
    </script>

    第四种:   

    <script language="JavaScript">          
    self.location=’top.htm’;   
    </script>

    第五种:   

    <script language="javascript">          
    alert("非法访问!");          
    top.location=’xx.jsp’;   
    </script>


    =====javascript中弹出选择框跳转到其他页面=====

    <script language="javascript">
    <!--
    function logout()...{
    if (confirm("你确定要注销身份吗?是-选择确定,否-选择取消"))...{
    window.location.href="logout.asp?act=logout"
    }
    }
    -->
    </script>


    =====javascript中弹出提示框跳转到其他页面=====

    <script language="javascript">
    <!--
    function logout()...{
    alert("你确定要注销身份吗?");
    window.location.href="logout.asp?act=logout"
    }
    -->
    </script>

  • 相关阅读:
    1058 A+B in Hogwarts (20)
    1036. Boys vs Girls (25)
    1035 Password (20)
    1027 Colors in Mars (20)
    1009. Product of Polynomials (25)
    1006. Sign In and Sign Out
    1005 Spell It Right (20)
    1046 Shortest Distance (20)
    ViewPager页面滑动,滑动到最后一页,再往后滑动则执行一个事件
    IIS7.0上传文件限制的解决方法
  • 原文地址:https://www.cnblogs.com/Ayanami-Blob/p/3705433.html
Copyright © 2011-2022 走看看