Password field default value

前端 未结 7 2341
野的像风
野的像风 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:46

    So if I understand correctly, you want it to read "password" or whatever in regular letters until someone clicks on it, at which point it will turn blank, and anything typed in there will become *'s? Ok what you want is this:

    in head:

    
    

    in the body:

提交回复
热议问题