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
Post a Comment