有什么方法可以在Opera中使onbeforeunload工作吗? [英] Is there any way to make onbeforeunload work in Opera?

查看:94
本文介绍了有什么方法可以在Opera中使onbeforeunload工作吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,Opera不支持js onbeforeunload消息,因此将不支持它. 但是,有什么方法可以使其正常工作吗? 也许某些jQuery插件可以使其工作并让脚本知道窗口是否要关闭? 我找到了对每个标签进行onclick的唯一方法,但这不是完整的解决方案.

I know, that Opera doesnt support JS onbeforeunload message and will not support it. But is there any way to make it work somehow? Or maybe some jQuery plugins can make it work and let script know if window is going to close? I found only way to make onclick for every a tag, but this is not the complete solution.

推荐答案

升级到Opera15.该版本现在支持onbeforeunload,因为它们已移至WebKit引擎.在12.x中仍不支持该版本,因为该版本和所有以前的版本均基于Presto.

Upgrade to Opera 15. onbeforeunload is now supported in that version because they moved to the WebKit engine. It is still not supported in 12.x because that version and all prior versions are based on Presto.

这篇关于有什么方法可以在Opera中使onbeforeunload工作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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