`
lerluc
  • 浏览: 17414 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

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

阅读更多
<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...jQuery history jQuery Address jQuery BBQ
分享到:
评论

相关推荐

    BackButton:BackButton for Android.Simulate android system button

    返回键 BackButton for Android.Simulate android system button. 您可以执行诸如导航到主屏幕、按返回按钮、通过它打开通知屏幕或最近的应用程序列表等操作。

    Learning jQuery 3 - Fifth Edition

    Also, we'll learn how to integrate jQuery with your favourite back-end framework. Moving on, we'll learn how the ECMAScript 6 features affect your web development process with jQuery. we'll discover...

    Android的backButton案例

    在Android开发中,`backButton`是用户界面中不可或缺的一部分,它主要负责提供导航功能,让用户能够返回到上一个活动(Activity)或者退出应用程序。这个案例对于初学者来说是一个很好的起点,因为它帮助理解如何...

    JS页面跳转和js对iframe进行页面跳转、刷新

    `window.history.back()`和`window.history.forward()`可以实现页面的后退和前进操作,而`window.history.go(n)`则可以指定移动的历史记录步数。 ```javascript window.history.back(); // 后退一步 window.history....

    jquery平滑返回顶部效果(兼容IE6)

    本文将详细介绍如何使用jQuery实现平滑的返回顶部效果,并确保该功能在古老的Internet Explorer 6(简称IE6)上也能正常工作。 首先,我们需要引入jQuery库,因为这个功能是基于jQuery构建的。你可以通过以下代码将...

    1613104635615_Tuning Dampers for Ride and Handling of Production Vehicles.pdf

    3. **Predictability**: Consistent and predictable handling is essential for driver confidence. Tuned dampers ensure that the vehicle reacts consistently to similar inputs, allowing the driver to ...

    (0011)-iOS/iPhone/iPAD/iPod源代码-导航条(Navigation Bar)-Customized Back Button

    此项目“(0011)-iOS/iPhone/iPAD/iPod源代码-导航条(Navigation Bar)-Customized Back Button”着重于自定义导航条上的返回按钮(Back Button)以及整体导航条的外观。以下是关于这个主题的详细解释: 1. *...

    【转载】去掉jquery menu plugin 的“No back link”

    标题中的“去掉jquery menu plugin 的‘No back link’”指的是在使用jQuery开发的菜单插件中,用户可能遇到一个名为"No back link"的问题。这个问题通常指的是菜单中没有返回上级菜单或者上一页面的链接,这可能对...

    The RebatesMe Cash Back Button-crx插件

    **当您准备好结账时,Rebates Me Cash Back Button也会为您显示购买时的最佳优惠券代码! **在2500多家商店中交易!** RebatesMe在所有顶级商店中都拥有最优惠的价格,而省时又省钱的RebatesMe Cash Back Button只需...

    CCeButtonST_vc2005.rar_back_button icon_ccebutton_wince button

    WinCE下的按鈕類,可以很方便的實現各種各樣的按鈕,Standard button,48x48 icon button,Disabled button,Search button,Back Next button,Lamp button

    phonegap-backbutton-plugin:phonegap-backbutton-plugin

    用于Cordova / PhoneGap的Backbutton插件 此插件将应用程序置于android设备的后台。 用法 用法示例: navigator . Backbutton . goHome ( function ( ) { console . log ( 'success' ) } , function ( ) { ...

    jquery回到顶部插件jquery.goup.js

    《jQuery回到顶部插件:jquery.goup.js深度解析》 在网页设计中,当页面内容过多时,用户可能需要频繁滚动来浏览整个页面。为了提供更好的用户体验,许多开发者选择引入“返回顶部”功能,使用户只需点击一下,就能...

    jquery翻书效果

    shadowTopBackWidth: 166, // shadow width for top back anim shadowBtmWidth: 50, // shadow width for bottom shadow before: function(){}, // callback invoked before each page turn animation after: ...

    jQuery Mobile 快速入门

    ### jQuery Mobile 快速入门详解 #### 一、引言 随着移动互联网的快速发展,越来越多的应用和服务需要在各种尺寸的设备上良好运行。为了适应这种趋势,开发人员需要掌握能够跨平台使用的前端框架。jQuery Mobile ...

    Get data back for NTFS

    "Get data back for NTFS" 是一个针对NTFS文件系统的数据恢复工具,旨在帮助用户从丢失、删除或损坏的数据中恢复重要信息。NTFS(New Technology File System)是微软Windows操作系统广泛使用的高级文件系统,特别是...

    jQuery下的返回顶部功能的实现实例页面

    &lt;button id="backtoTop" title="返回顶部"&gt;顶部&lt;/button&gt; ``` 为了实现返回顶部的功能,我们创建一个名为`backtoTop.js`的JavaScript文件。在这个文件中,我们需要编写jQuery代码来监听滚动事件并处理按钮的显示和...

    Packt.Learning.Jquery3

    We start by configuring and customising the jQuery environment, and getting hands-on with DOM manipulation.... Also, we’ll learn how to integrate jQuery with your favourite back-end framework.

    jQuery mobile库包及例子

    **jQuery Mobile 库包及实例详解** jQuery Mobile 是一个轻量级、易用的前端框架,专门用于构建响应式和触控友好的移动 Web 应用。它基于 jQuery 库,提供了一系列预定义的 UI 组件和交互效果,使得开发者能够快速...

Global site tag (gtag.js) - Google Analytics