Prompt text appears when the text disappears when the search box clicks
This example is a search box, click the Search box, the default prompt text automatically clear, leaving again display the default prompt text
realize click to clear left back effect focus is:
<input type= "text" name= "Q" title= "Search class=" Searchinput "id=" searchinput "value=" Please enter the Merchant name address "onkeydown=" if ( event.keycode==20) {} ' onblur= ' if (this.value== ') value= ' Please enter the merchant name address '; ' onfocus= ' if (this.value== ' Please enter merchant name address ') Value= '; value= "Please enter the Merchant name address"/>
Special supplement: HTML5 can also directly implement similar functions
Please refer to my other blog post "HTML5 easy to implement search box hint text Click Disappear-and placeholder color settings"
http://blog.csdn.net/pspgbhu/article/details/51465514