当用户在adobe flash中点击浏览器中的后退按钮时如何显示警告信息 [英] how to show alert message when user click back button in browser in adobe flash
本文介绍了当用户在adobe flash中点击浏览器中的后退按钮时如何显示警告信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
- >我是flash构建器灵活代码的新手
- >这里我需要显示当用户点击后退按钮(或)刷新页面时,他需要获取提示消息LIKEAre你确定要留下页面
- >请建议我用示例代码解决方案... plz dnt忘记一步一步解释
如果你知道答案<如果任何人帮助我,那么
i将会非常感恩。
我的号码9900002561
我的邮箱tbsr001@gmail.com
->i am new to flash builder flex code
->here i need to show when user click back button (or) refresh page ,he need to get alert message LIKE "Are you sure you want to leave page"
->please suggest me solution with example code...plz dnt forget to explan step by step
if u know answer
i will be thankful lot if any one help me
my number 9900002561
my mail tbsr001@gmail.com
推荐答案
看看JavaScripts onbeforeunload函数。
在这篇文章中可以找到一个很好的解释返回基础知识 - OnBeforeUnload事件 [ ^ ]
示例用法:
Have a look at JavaScripts onbeforeunload function.
A good explanation can be found in this article Back to Basics – OnBeforeUnload Event[^]
Example usage:
window.onbeforeunload = function(e) {
return 'Are you sure you want to leave page';
};
...希望它有所帮助。
... hope it helps.
这篇关于当用户在adobe flash中点击浏览器中的后退按钮时如何显示警告信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文