开发者

Is there equivalent of onbeforedeactivate event for Firefox etc.?

开发者 https://www.devze.com 2023-04-06 21:37 出处:网络
this works in IE $(\'#blah\').bind(\'beforedeactivate\', fnBl开发者_如何学Pythonah); but I can not find equivalent for Firefox and other browsersbeforedeactivate is an IE-specific event handler. Th

this works in IE

$('#blah').bind('beforedeactivate', fnBl开发者_如何学Pythonah);

but I can not find equivalent for Firefox and other browsers


beforedeactivate is an IE-specific event handler. The closest you can get are the focusout and blur events.

Usage in JQuery:

function eventHandler(){
    //...
};
$("element").focusout(eventHandler);
$("element").blur(eventHandler);

Links to JQuery implementations:

  1. Focusout
  2. Blur


You can use

object.addEventListener ("blur", handler, useCapture);

or

object.attachEvent ("onblur", handler);

found here: http://help.dottoro.com/ljjhfrjd.php

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号