<!DOCTYPE html>
<html>
<head>
<title>jQuery blur() method</title>
<script src="jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$("input").focus(function(){
$(this).css("background-color", "yellow");
});
$("input").blur(function(){
$(this).css("background-color", "white");
});
});
</script>
</head>
<body>
<div>
Username: <input type="text" name="username" />
<br />
Password: <input type="text" name="password" />
</div>
</body>
</html>