Hello, i was wondering how i can put text inside a <input form that disappear when the user clicks inside the form. I would like to write "Description" inside a form so they know that they have to write a description into that form.

Sorry if its hard to understand me hehe.
I hope someone got a clue.
Sincerely,
Sorcher

Recommended Answers

All 2 Replies

you can use javascript onclick event to set the text to blank.
e.g

....
<input type="text" name="description" value="Description" onclick="this.value='';">
....

thank you! I dont know a shi* about JS so i'm glad someone of us do D: ^^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.