i have form with text inputs having some value i.e. please enter name etc etc.
i want when the client clicks on the text field the default text to disappear. i after searching added the onclick=”this.value=\’\'” but its not clearing please help.
i have form with text inputs having some value i.e. please enter name etc
Share
You can use what stackoverflow uses on the search box:
Also, here is a question about the same thing: How do I make an HTML text box show a hint when empty?
NOTE: With HTML5 you can use the following:
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#attr-input-placeholder