Breaking News
yeni film izle hd film seyret film izle

OnBlur events In Java Script

This event occurs when objects loses the focus. When we move to other object and looses one object the first object is called blurred or lost focus. In javascript we can program this loosing focus using the onblur event.
 
Example:
 
<html>

<head>

<title>events </title>

</head>

<body bgcolor=green text=”white”>

<h3 align=center>

<u>In this example we used Javascript with in inverted quotes </u>

</h3>

<h4 align=center> just type text in text boxes and click on button</h4>

Name :<input type=”t1″ name=”t1″ id=”tt1″

onblur=”document.all.tt1.style.background=’red’;

document.all.tt1.style.color=’white'”> <br>

Address : <input type=”text” name=”t2″ id=”tt2″

onblur=”document.all.tt2.style.background=’red’;

document.all.tt2.style.color=’white'”> <br>

<input type=”button” value=”Hit me” name=”b1″>

</body>

</html>

Click here to view result of this program on browser
 
 
Example:
 
<html>

<head>

<title>events </title>

</head>

<body bgcolor=green text=”white”>

<h3 align=center>

<u>In this example we used Javascript with in inverted quotes </u>

</h3>

<h4 align=center> just type text in text boxes and click on button</h4>

Name :<input type=”t1″ name=”t1″ id=”tt1″ onblur=”document.bgColor=’red'”> <br>

Address : <input type=”text” name=”t2″ id=”tt2″ onblur=”document.bgColor=’blue'”> <br>

<input type=”button” value=”Hit me” name=”b1″>

</body>

</html>

Check Also

Functions Returning Values In Java Script

Function is a set of statements recognized by a name and can be used as …