|
|
<BODY ...>onFocus = "script command(s)"onBlur = "script command(s)"onFocusonBlur
| this code | produces this |
<BODY
onFocus="window.status='focused'"
onBlur="window.status='not focused'">
|
this page |
There is some difference in how browsers trigger the onFocusonFocusonFocus
If the page is framed, MSIE and Netscape are relatively consistent with each other. They both trigger onFocus<HEAD>
<SCRIPT TYPE="text/javascript">
<!--
function setbg(color)
{
document.bgColor=color;
document.body.style.backgroundColor=color;
}
//-->
</SCRIPT>
Then you could call this script with onFocusonBlur
<BODY onFocus="setbg('red')" onBlur="setbg('white')">
That gives us the events on this page.
The body loses the focus when objects inside the body get the focus. So, for example, onBlur
|
Recommended Resources |
|||
| web hosting tutorials Credit Help |
Search the Internet Search Engine Help |
Low Fat Lifestyle Internet Traffic |
Web
Hosting Web Design |
|
Discount
Hotel Reservations All
Rights Reserved, Copyright © Free-HTML-Tutorials.com 2003 |
|||