Fork me on GitHub

JavaScript返回上一页代码区别

JavaScript返回上一页代码区别:

window.history.go(-1);   //返回上一页
window.history.back();   //返回上一页
//如果要强行刷新的话就是:window.history.back();location.reload();
window.location.go(-1); //刷新上一页

 

posted @ 2015-02-27 16:47  磊哥|www.javacn.site  阅读(468)  评论(0编辑  收藏  举报