问题如下。如何通过单击Chrome中的链接确定onbeforeunload是否已导致
onbeforeunload
在Firefox中很有魅力,它具有e.explicitOriginalTarget.activeElement
,它显示了什么元素被点击导致它。
window.onbeforeunload = function(e){
if (e.explicitOriginalTarget.activeElement){
return;
}
在Chrome中,当您关闭窗口或点击链接“e
”对象看起来相同。 有什么方法可以确定铬中的目标?
就像我怀疑。谢谢! – ZooKeeper 2010-02-01 13:47:46