• js 返回上一页或上几页


    1. history.go(-1), 返回两个页面: history.go(-2);

    2. history.back().

    3. window.history.forward()返回下一页

    4. window.history.go(返回第几页,也可以使用访问过的URL)  

    例:

    <a href="javascript:history.go(-1);">向上一页</a>

    response.Write("<script language=javascript>")

    response.Write("if(!confirm('完成任务?')){history.back();}")

    response.Write("</script>")

    response.Write("<script language=javascript>history.go(-1);</script>")

    <a href="javascript:history.go(-1);">向上一页</a>

    页面跳转:οnclick="window.location.href='http://ayue05.blog.163.com/blog/list.aspx'"

    P.S.

    小技巧(JS引用JS):

    <script type=text/javascript>

    <!--

    if (typeof SWFObject == "undefined") {

    document.write('<scr' + 'ipt type="text/javascript" src="/scripts/swfobject-1.5.js"></scr' + 'ipt>');}

    //-->

    </script>

  • 相关阅读:
    最长上升子序列问题总结
    Problem C
    Problem C
    Problem P
    Problem P
    Problem H
    Problem H
    Problem D
    Problem D
    Linux系统调用--getrlimit()与setrlimit()函数详解
  • 原文地址:https://www.cnblogs.com/wybshyy/p/13783801.html
Copyright © 2020-2023  润新知