php - How to show text outside input ONFOCUS? -


i have form this:

<form action="search.php" class='search' method='get'> <input      type="text/submit"     class="home_search_area"     value="search"     name="search"      onblur="if(value=='') value = 'search'"      onfocus="if(value=='search') value = ''"  /></form> 

now form hides word "search" on focus. want show text "press enter start searching" outside textarea onfocus. how can this?

add element under input field:

<div id="tips"></div> 

add onfocus event:

onfocus="if(value=='search') value = ''; document.getelementbyid('tips').innerhtml = 'press enter...'" 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -