如何读取确认导航窗口onbeforeunload事件的值 [英] how to read the value of confirm navigation window onbeforeunload event

查看:120
本文介绍了如何读取确认导航窗口onbeforeunload事件的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

如何阅读窗口的价值

用户点击离开页面还是留在页面上



i我在mvc-jquery项目中显示自定义的laoder。

当用户点击停留在页面上时我想隐藏它我需要点击按钮..

Hi
How To read the value of window
whether user click leave page or stay on page

i am displaying custom laoder in mvc-jquery project.
when user clicks stay on page i want to hide it for that i need the click button..

推荐答案

参考 -

1. [ ^ ]。

2. 检测用户是否在提示onBeforeUnload后停留 [ ^ ]。



您需要编写代码风ow.onbeforeunload event。
Refer -
1. Javascript How to call a function when we choose Stay on Page in Chrome[^].
2. Detecting whether user stayed after prompting onBeforeUnload[^].

You need to write code for window.onbeforeunload event.


这篇关于如何读取确认导航窗口onbeforeunload事件的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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