back button history handling for iframe with jquery (IE failed me again)

xiaoxiao2022-06-12  28

<script src=js/jquery/1.3.2.js></script><script src=js/jquery/timers.js></script><a name=n1 url=http://g.cn /><a name=n2 url=http://sohu.com /><a name=n3 url=http://pcpop.com /><a href=#n1>g.cn</a><a href=#n2>sohu.com</a><a href=#n3>pcpop.com</a><hr/><iframe name=iframe width=1280 height=1024></iframe><script>var cm = {hash: ''}$(document).everyTime(100, function(){ var hash = location.hash if(hash && cm.hash != hash){ cm.hash = hash frames.iframe.location.replace($('a[name='+hash.slice(1)+']').attr('url')) }})</script> Doesn't work in IE...>_< Turns out there are plugins for this already...[url=http://www.mikage.to/jquery/jquery_history.html]jQuery history[/url] [url=http://www.asual.com/jquery/address/]jQuery Address[/url] [url=http://benalman.com/projects/jquery-bbq-plugin]jQuery BBQ[/url] 相关资源:微信小程序源码-合集3.rar
转载请注明原文地址: https://www.6miu.com/read-4932277.html

最新回复(0)