Password field default value

前端 未结 7 2295
野的像风
野的像风 2021-01-06 09:22

How can I both use the HTML password input and set a text default value that will be readable since the password input will turn the characters into dots or stars? Can I do

7条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-06 09:55

    You could simply use the placeholder attribute:

    
    

    This way, as soon as the user starts typing, the suggestion would go automatically away.

提交回复
热议问题