Clear on mouse click function

http://www.java-scripts.net/javascripts/Clear-Form-Field-Value-on-Click.phtml


Clear default form value script- By Ada Shimar (ada@chalktv.com)
*/

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}
</script>


<form>
<input type="text" value="Search this site" onFocus="clearText(this)">
</form>

Comments

Popular posts from this blog

Set up RAID on Dell Poweredge 2850

How to implement Blueimp with Laravel 5

HackUB (Hackathon Ulaanbaatar) - Organizing event