Hi there,
I believe this would be a javascript piece of code.
Basically i need help with input fields that when clicked the text (value) disappears but if the user has not entered anything in it would revert back to what was originally there.
I have managed to get the value inside to disappear once clicked without the use of javascript but would love someone to point me in the right direction of how to revert the original value back if nothing was entered in if the user did click inside as the field continues to be blank which i know is minimal but it something small that is annoying me
Heres what i have got at the moment…
<input onfocus="if(this.value == 'Name'){this.value = '';}" type="text" id="name" value="Name" />
<input onfocus="if(this.value == 'Email'){this.value = '';}" type="text" id="email" value="Email">
<textarea name="message" onfocus="if(this.value == 'Message'){this.value = '';}" class="textarea">Message</textarea>
<button type="submit" class="button">Submit</button>