没有onbeforeunload和unload事件的浏览器后退事件 [英] Browser Back Event without onbeforeunload and unload events

查看:91
本文介绍了没有onbeforeunload和unload事件的浏览器后退事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理付款流程,当用户单击浏览器返回时,需要带有两个链接的自定义POP UP"确认框,一个链接重定向到Javascript或Jquery中的不同页面,另一个链接到相同页面.请帮助我

I'm working on payment flow, when user clicks browser back need to Custom POP UP confirmation box with two links one to redirect to different page and second to same page in Javascript or Jquery. Please help me on this

推荐答案

这可能会对您有所帮助(尽管不是干扰浏览器控件的最佳做法):

This might help you (although it's not best practice to interfere with browser controls): https://developer.mozilla.org/en-US/docs/Web/API/window.onbeforeunload

这篇关于没有onbeforeunload和unload事件的浏览器后退事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆