0

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.

Continue readingPrevious » « Next

Leave a Comment






XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>