Here’s another neat trick: making the search (or any field for that matter) have an auto clear and restore javascript element. This comes from Perishable Press.
<form action="http://domain.com/" method="post">
<p>
<input value="Click here and this will disappear.." onfocus="if(this.value == 'Click here and this will disappear..') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Click here and this will disappear..';}" type="text" size="77" />
</p>
</form>
Just change the value “Click here and this will disappear..” to anything you want wherever it appears in the code.
Popularity: 17% [?]
If you liked this post then consider subscribing to our full feed RSS. You could also subscribe to our email feed and have new posts sent directly to your inbox.