zoukankan      html  css  js  c++  java
  • history.go(number|URL)

    go() 方法可加载历史列表中的某个具体的页面。

    该参数可以是数字,使用的是要访问的 URL 在 History 的 URL 列表中的相对位置。(-1上一个页面,1前进一个页面)。或一个字符串,字符串必须是局部或完整的URL,该函数会去匹配字符串的第一个URL。

    1.<span class="fr Mt-16 FsF Mr-12"><a class="btn fanhuian" href="javascript:history.go('http://localhost/GHGL/yewu_sys/4dagl')"><< 返回</a></span> <strong class="tit">档案管理</strong>

    2.<span class="fr Mt-16 FsF Mr-12"><a class="btn fanhuian" href="javascript:history.go('-1')"><< 返回</a></span> <strong class="tit">档案管理</strong>

    3.history.go().在ie,go(-1): 返回上一页, 原页面表单中的内容会丢失; back(-1): 返回上一页, 原页表表单中的内容会保留.


    <input type=button value=刷新 onclick="window.location.reload()">
    <input type=button value=前进 onclick="window.history.go(1)">
    <input type=button value=后退 onclick="window.history.go(-1)">
    <input type=button value=前进 onclick="window.history.forward()">
    <input type=button value=后退 onclick="window.history.back()"> 后退+刷新

    ==

    <input type=button value=后退 onclick="window.history.go(-1);window.location.reload()"> 

    Javascript刷新页面的几种方法:

    1 history.go(0)
    2 location.reload()
    3 location=location
    4 location.assign(location)
    5 document.execCommand('Refresh')
    6 window.navigate(location)
    7 location.replace(location)
    8 document.URL=location.href 

  • 相关阅读:
    list(range(10))解释
    numpy.random.normal函数
    适用于Python扩展程序包的非官方Windows二进制文件
    Linux--vi/vim编辑器常用命令
    Centos Mirrors List (centos7)
    windows--redis安装
    Celery 3.x 升级至 celery 4.x(转)
    windows/linux(centos7)安装SVN
    远程获取--snmp模块(python)/snmp-cmds,easysnmp
    FileZilla客户端(OS)连接Linux
  • 原文地址:https://www.cnblogs.com/523823-wu/p/8465371.html
Copyright © 2011-2022 走看看