history.back(-1)和history.go(-1)的区别

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

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

返回到指定连接:document.location.href= "${pageContext.request.contextPath}"+returnUrl;

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

引自:http://blog.sina.com.cn/s/blog_6f1f9ead0100n2h6.html
原文地址:https://www.cnblogs.com/Defry/p/4511535.html