0
I have a form and I want it to appear in the field when loading the page "Insert your name here" and when the user clicks to type, I want that sentence to go away! Is it possible ? How is it done?
0
I have a form and I want it to appear in the field when loading the page "Insert your name here" and when the user clicks to type, I want that sentence to go away! Is it possible ? How is it done?
4
I believe the easiest way to do that would be to use the attribute placeholder
of html
:
Name <input type="text" name="name" placeholder="insert your name here"><br>
When the user starts typing, the message in question disappears from within the field.
Thank you very much! I had done so onfocus=" this.value= ' ' " but in its way it got even better!
Then he only accepts the answer so the community knows that his question has been answered. For this just click on the correct sign, similar to a "V" existing next to the answer.
Browser other questions tagged javascript html front-end
You are not signed in. Login or sign up in order to post.
Read about the attribute
placeholder
of HTML.– Woss