jquery注册文本框获取焦点清空,失去焦点赋值

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

在我们开发过程中特别是用户注册时会有一个效果,就是文本框获取焦点清空提示,如果用户没有输入信息失去焦点赋值上我们的提示语
<html>  
<head>  
<meta http-equiv="content-type"content="text/html; charset=UTF-8"/>  
<script src="http://127.0.0.1/jquery.js"></script>  
<script>  
$(function(){  
  $("#account").focus(function(){  
   var account_value=$(this).val();  
   if(account_value=="请输入账号"){  
    $(this).val("");  
   }  
  });  
  $("#account").blur(function(){  
   var account_value=$(this).val();  
   if(account_value==""){  
    $(this).val("请输入账号");  
   }  
  });  
});  
</script>  
</head>        
<body>  
  
账号:<input id="account" type="text" value="请输入账号" />  
  
</body>  
</html>