输入框焦点时自动清除value
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="jquery-1.9.1.js" ></script>
<script type="text/javascript">
$(function(){
$('#address').focus(function(){
$(this).val()==this.defaultValue?$(this).val(''):'';
});
$('#address').blur(function(){
$(this).val()==''?$(this).val(this.defaultValue):'';
});
})
</script>
<title></title>
</head>
<body>
<input type="text" id="address" value="请输入邮箱地址" />
</body>
</html>