javascript - How to work History.back() in IE8 and above Versions - Stack Overflow

I'm facing a big issue related to "Back Button",Currently I am using JavaScript back bu

I'm facing a big issue related to "Back Button", Currently I am using JavaScript back button like - parent.history.back(); but it is giving error like "Webpage has expired" on clicking Back button. is there any solution to get rid of it. My Project is in Asp.Every ment is appreciated. Thank you..!

I'm facing a big issue related to "Back Button", Currently I am using JavaScript back button like - parent.history.back(); but it is giving error like "Webpage has expired" on clicking Back button. is there any solution to get rid of it. My Project is in Asp.Every ment is appreciated. Thank you..!

Share Improve this question asked Dec 13, 2013 at 7:21 Frank JamesFrank James 1572 gold badges5 silver badges16 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

Here is a working example (tested on saucelabs IE7, IE8, IE9 @Windows XP and Vista)

<input type="button" id="push-me" value="Push me!" onclick="window.history.back(); return false;"/> 

If it still doesn't work for you may ensure that your tests are not executed within an iframe but a separate window.

It is probably a syntax error.

onclick="history.go(); return false;" 

or

onclick="history.go(-1); return false;" 

should work. Else you could try document referrer instead:

location.href = document.referrer;

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745116763a4612173.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信