Delete default value of an input text on click

前端 未结 13 1961
逝去的感伤
逝去的感伤 2020-11-29 18:24

I have an input text :


I want to put a default value like

13条回答
  •  [愿得一人]
    2020-11-29 19:09

    we can do it without using js in the following way using the "placeholder" attribute of html5 ( the default text disappears when the user starts to type in ,but not on just clicking )

    see this: http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_placeholder

提交回复
热议问题