In web development over species, have put more browser when we log in, asking whether we want to remember user name and password. When we in the actual development process, will meet some of the demand,
However, there will be
This time only need to put a line in the input of the problem can be solved automatically populated
autocomplete="new-password"
This is also the reference method Netease mailbox
As for why do it? I do not dare to ask, we can not tell ah. Do not! Easy to use on the line.
However, some UI framework is not supported
In such a way that the page will complain, as the error message Well, different, I'm just iviewui as a chestnut.
Although it is written, and when type = "password", it seems no use. But do not party, there is always a way, it is the Black & Technology. Catches mice is a good cat meow.
document.querySelectorAll('input[type=password]').forEach(item=>{
item.setAttribute("autocomplete","new-password");
})