Frame.onBlur

JavaScript 1.1+, JScript 1.0+ Nav3+, IE 3+, Opera3+ Syntax

onBlur="command"

Description

The onBlur event handler specifies when the focus has been removed from a frame.

Example

In Listing 7.277, the onBlur event handler is used to change the color of the upper frame when the focus is set on it.

Listing 7.277 Using the onBlur Event Handler
<html>
<title> Example of onBlur event handler of the Frame object</title>

<script language = "JavaScript">
<!-- Hide
function change(){
     frames[0].onBlur=new Function("document.bgColor='green'")
}
// End Hide --->
</script>

<frameset rows="50%,*" onLoad=change()>
<frame name="topFrame" src="top.html">
<frame name="bottomFrame" src=bottom.html>
</frameset>
							

</html>
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.