PHP学习笔记之history.go(-1)和History.back()的区别

简单的说就是:

history.back(-1):直接返回当前页的上一页,数据全部消息,是个新页面


history.go(-1):也是返回当前页的上一页,不过表单里的数据全部还在


history.back(0) 刷新 history.back(1) 前进 history.back(-1) 后退


<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()">

 

posted on 2017-02-20 12:02  小猿丶成长记  阅读(575)  评论(0)    收藏  举报