Windows下的window.history.back()后退后返回的不仅是前一个页而是前一个页的状态。若是一个页我修改了3次那必须后退3次才能回到前一个页。并且数据库中删除的数据依然显示在上面感受很是的不实用。数据库
解决办法:history.back()后再加一个reload()这样就能够回到刷新后的页面了框架
即:history.back();location.reload();若是有框架即在前面加上该框架名便可spa
****************************注释******************************************code
1: history.go(-1);//返回上一页。返回不带数据;orm
2: window.**** ==*****;ci
3: window.**** ==document.***input
4: 用document.location.href切换后,能够退回到原页面。而用document.location.replace切换后,不能够经过“后退”退回到原页面。 it
<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()">在C# Web程序中,如为页面按钮写返回上一页代码