-3

I have an input text, I wanna set a default value on it and when I click to enter my text. The default value must be removed. how to do that.

senior
  • 2,196
  • 6
  • 36
  • 54
  • 1
    That's a terrible idea. If the default value should be removed if the user thinks about changing it, then it is a terrible default. Maybe you want a placeholder or a label instead (keeping in mind that they are [not interchangeable](http://www.456bereastreet.com/archive/201204/the_html5_placeholder_attribute_is_not_a_substitute_for_the_label_element/)) – Quentin Mar 17 '14 at 13:47

1 Answers1

2

I think you want a placeholder:

<input placeholder="Write something here..."/>

Fiddle: Fiddle

Anonymous
  • 11,748
  • 6
  • 35
  • 57