<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>InputChangeBack</title>
<style type="text/css">
.line{
width:500px;
height:20px;
background:url(../image/blockbg.gif) left bottom repeat-x !important;
}
.focus{
border: 1px solid #f00;
background:#fcc;
}
</style>
<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$(":input").focus(function(){
$(this).addClass("focus");
}).blur(function(){
$(this).removeClass("focus");
});
});
</script>
</head>
<body>
<form action = "#" method = "POST" id = "regForm">
<fieldset>
<legend>个人基本信息</legend>
<div>
<label for="username">名称:</label>
<input id="username" type = "text" >
</div>
<div>
<label for="pass">密码:</label>
<input id="pass" type = "password">
</div>
<div>
<label for="msg">详细信息:</label>
<textarea id="msg"></textarea>
</div>
</fieldset>
</form>
</body>