Onclick event to remove default value in a text input field

前端 未结 9 1270
傲寒
傲寒 2021-02-02 14:57

I have an input field:


How would I get it to remove the pre-defined text (Enter Your Name

9条回答
  •  攒了一身酷
    2021-02-02 14:59

    You actually want to show a placeholder, HTML 5 offer this feature and it's very sweet !

    Try this out :

    
    

提交回复
热议问题