搜索文本框带提示点击消失解决方法

直接上代码:

搜索文本框带提示点击消失解决方法(js方法)

1 <input id="search_text" type="text" style="float:right; height:21px; line-height:21px; margin-right:5px;" value="请输入"  class="input_color1" onfocus="if (this.value =='请输入'){this.value ='';this.className='input_color2';}" onblur="if (this.value ==''){this.value='请输入';this.className='input_color1';}" />
原文地址:https://www.cnblogs.com/weisenz/p/2426609.html