Sophie Huang
Time and tide wait for no man.

使用onblur和onfocus属性: 

<input type="text" value="默认值" onblur="if(this.value==''){this.value='默认值'}" onfocus="if(this.value=='默认值'){this.value=''}" />

  

 

posted on 2013-09-29 15:12  Sophie Huang  阅读(523)  评论(0编辑  收藏  举报