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

来源:互联网 发布:java 比特币源代码 编辑:程序博客网 时间:2024/06/02 06:39

直接上代码:

搜索文本框带提示点击消失解决方法(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';}" />

 

0 0