Return to Snippet

Revision: 15218
at June 27, 2009 12:56 by Tate


Initial Code
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
<input type="text" onblur="if (this.value == '') {this.value = 'To search, type and hit enter';}" onfocus="if (this.value == 'To search, type and hit enter') {this.value = '';}" value="<?php if ($_REQUEST['s']) { the_search_query(); } else { echo 'To search, type and hit enter'; } ?>" name="s" id="s" />
</form>

Initial URL


Initial Description


Initial Title
Search form with onblur and onfocus text

Initial Tags
javascript, search, wordpress

Initial Language
PHP