`

点击输入框,默认内容清除.离开,恢复.

    博客分类:
  • html
 
阅读更多
<input type='text' value="Friend's username" 
onfocus="if(this.value == 'Friend\'s username'){this.value = ''};" onblur="if(this.value == ''){this.value = 'Friend\'s username'}"/>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics