/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
add the following code in the <HEAD> </HEAD> part of your document: <script type="text/javascript"> <!-- function clearDefault(el) { if (el.defaultValue==el.value) el.value = "" } // --> </script> Then use this script in your search/text box: <FORM> Email: <INPUT TYPE=text VALUE="E-Mail Address" ONFOCUS="clearDefault(this)"><BR> Search: <INPUT TYPE=text VALUE="Search Text" ONFOCUS="clearDefault(this)"> </FORM>