jQuery 或 JS 处理浏览器后退按钮
有什么想法如何通过 jQuery 拦截浏览器后退按钮,以便我可以运行我的事件函数吗? 我不需要使用 jQuery BBQ 或 jQuery Address,只需要阻止默认行为并在一些动画之后运行它。
谢谢你!
d
Any ideas how to intercept the browser back button via jQuery, so I can run my event function?
I don't need to use jQuery BBQ or jQuery Address, only prevent the default behaviour and run it later after some animate.
Thank you!
d
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没有尝试过,但我想这就是你想要的。
使用 jQuery 你可以尝试 .unload() 函数
Have not tried but i guess this do what you want.
with jQuery you could try the .unload() function
在 jQuery 领域:
编辑 - 有一个括号而不是右括号
编辑 - 删除了额外的分号
In jQuery land:
EDIT- There was a parentheses instead of a close bracket
EDIT - Removed Extra Semicolin