Broser构象警报 [英] Broser conformation alert

查看:134
本文介绍了Broser构象警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要求向用户显示确认提醒。我要求知道用户在留在页面上时点击离开页面的时间。根据用户点击按钮,我需要做功能。



请帮助我们





感谢您的帮助。

I have a requirement to show to user confirmation alert. AS my requirement to know when user clicks on the "leave the page" anf when "Stay on the page". Based on the user clicks on the button i need to do functionality.

Please help us


Thanks for your help.

推荐答案


(窗口).on(" beforeunload" ,function(){



return你确定要离开吗?;

});
(window).on("beforeunload", function () {

return "are you sure you want to leave?";
});


Quote:

但是没有直接的方法。希望这会奏效。快乐的编码!! :)







< html>

< head>

< script src =// code.jquery.com/jquery-1.10.2.js\"></script>

< ;脚本>

backagain = 0;

close = 0;

However there is no direct way. Hope this will work. Happy coding!!:)



<html>
<head>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script>
backagain=0;
close = 0;


这篇关于Broser构象警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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