How can I clear the input text after clicking

后端 未结 14 1777
遥遥无期
遥遥无期 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:53

    There is an elegant way to do this:

    
    

    In this way, if you type anything inside the search box, it won't be deleted when click inside the box again.

提交回复
热议问题