How do I auto-hide placeholder text upon focus using css or jquery?

后端 未结 26 1780
长情又很酷
长情又很酷 2020-11-28 00:39

This is done automatically for every browser except Chrome.

I\'m guessing I have to specifically target Chrome.

Any solutio

26条回答
  •  一向
    一向 (楼主)
    2020-11-28 01:19

    No need to use any CSS or JQuery. You can do it right from the HTML input tag.

    For example, In below email box, the placeholder text will disappear after clicking inside and the text will appear again if clicked outside.

    
    

提交回复
热议问题