[英]Using browser back button to navigate between the website pages
I have search this but didn't get useful information. 我已对此进行搜索,但未获得有用的信息。 In my website I have a order processing scenario. 在我的网站上,有一个订单处理场景。 currently I am using a "back" button on page to go to the previous order page. 目前,我正在使用页面上的“后退”按钮转到上一个订购页面。 I want to go back through the browser back button. 我想通过浏览器的“后退”按钮返回。 I want the code which I added in page back button can run when I use the browser back button. 我希望在使用浏览器后退按钮时可以运行在页面后退按钮中添加的代码。 How I achieve this..? 我该如何实现..?
try like this 这样尝试
$(document).ready(function(){
$('a.back').click(function(){
parent.history.back();
return false;
});
});
here the link is the one on which click you want to go back 这是您要返回的点击链接
or even better have a look at this 甚至最好看看这个
History.go
can do that: History.go
可以做到:
parent.history.go(-1);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.