window.onfocus and window.onblur not working in IE8

Posted by AshokD on Stack Overflow See other posts from Stack Overflow or by AshokD
Published on 2012-06-07T09:47:19Z Indexed on 2012/06/07 10:40 UTC
Read the original article Hit count: 200

Filed under:
|
|
|

Both the events are getting fired at the time onblur event.

<script src="js/jquery-1.7.2.js" type="text/javascript"></script>

<script language="javascript" type="text/javascript">

    window.onfocus = function() {
        $('#msg').html($('#msg').html() + '<br/> focus');
    };
    window.onblur = function() {
        $('#msg').html($('#msg').html() + '<br/> Blur');
    };
</script>

<div id="msg">
</div>

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery