body
{
font:normal 12px/17px Arial;
}
fieldset
{
width:15em;
}
div
{
padding:2px;
}
input, textarea
{
width:12em;
border:1px solid #f00;
}
.focus
{
border:1px solid #f00;
background:#fcc;
}
$(function(){
$(":input").focus(function(){
$(this).addClass("focus");
if($(this).val() == this.defaultValue)
{
$(this).val("");
}
}).blur(function(){
$(this).removeClass("focus");
if($(this).val() == "")
{
$(this).val(this.defaultValue);
}
})
})
个人信息
名称:
密码:
详细信息:
详细信息