<html>
<meta content-type: text/html
charset = "utf-8">
实现在input框内提示请输入用户名,鼠标点击后消失,鼠标失焦后显示
<br>
username :<input type = "text" name = "uaername" placeholder = "请输入用户名">
<br>
<input type = "text" name = "aaa" value = "请输入关键字" style = "color:#999" onfocus = "if(this.value=='请输入关键字') {this.value = '';this.style.color='#424242';}" onblur = "if(this.value == '' ){this.value = '请输入关键字';this.style.color = '#999'}"></input>
</input>
<!-- this.style.color = black" -->
</html>