[英]window.onbeforeunload…alert to restrict when refresh button click?
I have security problem that when user sing in 我在用户唱歌时遇到安全问题
if he leave\\close the window before logout, I want to show alert Msg! 如果他在注销前离开\\关闭窗口,我想显示警报消息!
So that i Did, 所以我做到了
window.onbeforeunload = function(){ return " confirm msg";}
I get the alert but Now problem Is, 我得到警报,但现在的问题是,
If i click refresh button default operation wanna Run. 如果我单击刷新按钮,则默认操作为“运行”。 (with out alert msg) (没有提醒信息)
I got the answer in keyBoard but not in Can any one help me, 我在keyBoard上得到了答案,但没有人能帮上忙,
how to detect when the user click the Refersh button 如何检测用户何时单击“ Refersh”按钮
if u have any suggestion pls post... 如果您有任何建议请发表...
不幸的是,您无法判断onbeforeunload
事件是否由刷新,关闭等触发。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.