Handling onBlur and onFocus in Frames : Browser Event « Window Browser « JavaScript DHTML






Handling onBlur and onFocus in Frames

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function gotFocus() {
 document.bgColor="#FFFFFF"
}
function lostFocus() {
 document.bgColor="#FF0000";
}
</SCRIPT>
</HEAD>
<BODY onFocus="gotFocus()" onBlur="lostFocus()">
<H1>Document 1</H1>
</BODY>
</HTML>

           
       








Related examples in the same category

1.Using the History Object to Navigate
2. IE4+ Event Coordinate Properties
3.Using the srcElement property
4. NN4 Event Capture and Release 1
5.Document and Layer Event Capture and Release
6.NN4 Capture, Release, and Route Events
7.NN4 Redirecting Events
8. Event Bubbling Demonstration
9.Cancelling and Redirecting Events in IE5.5+
10.NN6 Event Capture and Bubble
11.Preventing Bubble and Capture
12.Cancelling and Redirecting Events in NN6+