1、<INPUT onclick="history.go(-1)" type="button" value="Button">
2、<a href="JavaScript:history.back(-1)">点击返回</a>
3、<%String ref = request.getHeader("REFERER");%>
<input type="button" id="backBtn" name="button" class="button_return" value="返回"
onclick="javascript:window.location='<%=ref%>'">
本文介绍了三种使用HTML和JavaScript实现网页返回功能的方法:通过按钮触发history.back()函数、设置按钮的onclick属性为history.go(-1)以及根据REFERER头信息跳转。
1万+

被折叠的 条评论
为什么被折叠?



