I have set a default value in textarea. I want that when someone clicks on the textarea the default value disappears. Whats the HTML code for that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
this is the little piece of code responsible:
basically when the focus event is fired, the value of the current field is set to an empty string
""of course you can make it more complexe and make sure it only erase when the element contains the default message:
javascript: