Text in HTML Field to disappear when clicked?

后端 未结 7 599
悲&欢浪女
悲&欢浪女 2020-12-13 18:12

I can easily create a html input field that has text already in it. But when the user clicks on the input field the text doesn\'t disappears but stays there. The user then h

7条回答
  •  执念已碎
    2020-12-13 18:45

    Use the placeholder attribute. The text disappears when the user starts typing. This is an example of a project I am working on:

提交回复
热议问题