开发者

back button in an iframe (BUG?)

开发者 https://www.devze.com 2023-03-03 20:01 出处:网络
I am trying to implement a back button in an iframe for safari using javascript. Basically, I created a website using 5 iframes. In one of those iframes, there is a back button that uses simple javasc

I am trying to implement a back button in an iframe for safari using javascript. Basically, I created a website using 5 iframes. In one of those iframes, there is a back button that uses simple javascript.

<a href="javascript:history.back()">&laquo; Go back</a>

Everything seems to work fine with IE but when I test my website in Safari this Back button acts like it is using window.history.go(-1).

I also read this link: http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/ and I am not sure what to do.

Any ideas to fix th开发者_运维技巧is issue? Also tried javascript: self.history.go(-1) but had no luck.

0

精彩评论

暂无评论...
验证码 换一张
取 消