Hi all,
I want to add some yellow background when focus turns to text input and remove it when it moves. Here is my code for JQuery
$(document).ready(
function(){
//make form display yellow color when mouse is focused on item
$("input").focus( function(){
$(this).css('background-color' : 'yellow');
} );//end focus
});
a HTML form
<html>
<head>
<title>Login in Site</title>
<link rel="stylesheet" type="text/css" href="/loginsys/site.css" />
<script type="text/javascript" src="/loginsys/lib/form.js"> </script>
</head>
<body>
<div id="form">
<form action="/loginsys/include/login.php" method="POST">
<p><b>Username:</b> <input type="text" name="usrname" /></p>
<p><b>Password:</b> <input type="text" name="passwd" /></p>
<p><input type="submit" value="Login" /></p>
</form>
</div>
</body>
</html>