I left the page or browser for a while and come back to the page after a while. Is there any event for the re-focus?
A:
Yes, you can detect a blur and focus event on the window object in most browsers.
Pat
2010-09-14 13:45:43
A:
I am not sure what exactly you mean by coming back to page but, you can use:
<body onfocus="yourjsfunction();">
or:
<body onmouseover="yourjsfunction();">
Musa Hafalır
2010-09-14 13:45:44
A:
Not sure if this works in all browsers, but
document.focus = function() {
//stuff to do
}
wheresrhys
2010-09-14 14:35:47