JS 页面跳转和刷新

来源:互联网 发布:linux 写文件命令 编辑:程序博客网 时间:2024/05/21 13:30
  • location.replace(“top.html”)
  • location.href=”top.html
  • document.location=”top.html
  • window.navigate(“top.html”)
  • window.parent.close

<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()">后退+刷新<input type=button value=后退 onclick="window.close();"> 关闭窗口,不弹出系统提示,直接关闭
0 0
原创粉丝点击