检测使用jquery刷新的浏览器 [英] detect browser refreshed using jquery

查看:136
本文介绍了检测使用jquery刷新的浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.. Gud mrng。



我要求如果用户点击刷新按钮或f5我需要将页面重定向到登录页面..



我用浏览器关闭了

$(窗口).bind('beforeunload',function(e){

//我的logiic

});



但我在刷新或按f5时失败了..



如果你知道的话。

请帮助我..



谢谢,
Honey ..

Hi.. Gud mrng.

I have d requirement that if the user clicked refresh button or f5 I need to redirect the page to Login page..

I had done with browser close using
$(window).bind('beforeunload', function (e) {
//my logiic
});

But i failed in the refresh or pressing f5..

if u know .
plz help me..

Thanks,
Honey..

推荐答案

(窗口).bind('beforeunload',function(e){

//我的logiic

});



但我在刷新或按f5时失败了..



如果你知道的话。

请帮助我..



谢谢,

亲爱的..
(window).bind('beforeunload', function (e) {
//my logiic
});

But i failed in the refresh or pressing f5..

if u know .
plz help me..

Thanks,
Honey..


链接1



链接2



检查以上2个链接
Link 1

Link 2

Check the above 2 links


检查这个 [ ^ ]



请检查以上解决方案,它使用了javascript,但我想这可以解决你的这个问题。

谢谢

:)
check this[^]

Please check the above solution, it has used javascript, but i guess this would solve this problem of yours.
Thanks
:)


这篇关于检测使用jquery刷新的浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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