zoukankan      html  css  js  c++  java
  • JS返回上一页

       1、window.history.go(-1); //返回上一页

       2 、window.history.back(); //返回上一页

       3、window.location.go(-1); //刷新上一页

       4、window.history.back();location.reload();//强行刷新(返回上一页刷新页面)

     

    //如果要强行刷新的话就是:window.history.back();//刷新当前页 window.location.reload();

    Javascript 返回上一页:

    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='index.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>

  • 相关阅读:
    【SR】MAP
    【SR】Example-based
    【SR】论文资源相关
    【SR】正则化超分辨率复原
    词汇累记
    单模光纤与多模光纤的实际使用
    光纤中的光波长
    数码相机常用CCD/CMOS尺寸对比
    尼康D90多点对焦
    Python3.x:日期库dateutil简介
  • 原文地址:https://www.cnblogs.com/yangyangming/p/12485968.html
Copyright © 2011-2022 走看看