On my website, gayeventsguide.com, I have a place to signup for my newsletter at the top right.
In the form field it says “Enter Email”
How do I create a javascript that once the focus is placed inside the box it will remove the “Enter Email” statement?
Thanks Jacob
<i> </i><input type="text" onfocus="this.value='';this.onfocus=null" value="Enter Email">
<i> </i><script type="text/javascript"> function input_onfocus(el){ el.value=''; el.onfocus=null } function input_onblur(el){ el.value='Enter Email'; el.onfocus=function(){ input_onfocus(this) } } </script> </head> <body> <input type="text" onfocus="input_onfocus(this)" onblur="input_onblur(this)" value="Enter Email">
Help @planeboy747 spread the word by sharing this article on Twitter...