How can I clear the input text after clicking

后端 未结 14 1772
遥遥无期
遥遥无期 2021-01-31 07:26

Using jQuery, how can I clear the input text after I made a click? By default, the value remains in the input field.

For example, I have an input text and the value is <

14条回答
  •  花落未央
    2021-01-31 07:37

    I am supposing you are trying to create a effect, where the textbox contains a label. And when the user click in the textbox, it disappears and lets the user input the text. You do not require Jquery for this.

    
    

    Demo

提交回复
热议问题