如何在IE8及以上版本中使用History.back() [英] How to work History.back() in IE8 and above Versions
问题描述
我正面临一个与后退按钮相关的大问题,
目前我正在使用JavaScript后退按钮,例如 - parent.history.back();
但是在点击返回按钮时出现网页已过期等错误。是否有任何解决方案摆脱它。我的项目在Asp.net.Every评论表示赞赏。
谢谢..!
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.net.Every comment is appreciated. Thank you..!
推荐答案
这是一个工作示例(在酱油IE7,IE8,IE9 @Windows上测试过XP和Vista)
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;"/>
如果它仍然不起作用,可以确保您的测试不在<$内执行c $ c> iframe 但是一个单独的窗口。
If it still doesn't work for you may ensure that your tests are not executed within an iframe
but a separate window.
这篇关于如何在IE8及以上版本中使用History.back()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!