I have a simple text field on my page, with the initial text value of ‘Enter your Email‘. When the page loads, I automatically set the focus to this box, using the following:
<body onLoad="document.emvForm.EMAIL_FIELD.focus()">
I would like to make it so that when the user starts to type into the box, it clears the text, as opposed to clearing the text on-focus.
How can I go about this?
Try the following:
Here’s the fiddle: http://jsfiddle.net/wpZ8n/
I hope this helps!