input 默认值为灰色,输入时清楚默认值

input 默认值为灰色,输入时清楚默认值

<input value="please input your name" onFocus="if(value==defaultValue){value='';this.style.color='#000'}" onBlur="if(!value){value=defaultValue; this.style.color='#999'}" style="color:#999" ng-model="owner_name" id="owner" />

  

posted @ 2016-06-12 01:48  juandx  阅读(1978)  评论(0编辑  收藏  举报