DWQA QuestionsCategory: ProgramHow does JS / CSS prevent browsers from automatically filling in account passwords?
Tomatoes asked 1 month ago

Current scenario
The browser opens the page, and the form exists on the page. Browser auto populatedAccount number/PasswordOfinput
At the same time, the browser automatically forces theseinputAttachedstyle
Due to browser attachedstyleNot meeting the requirements of the employerstyle
So now I need to disable the browser from automatically filling in the account password,To avoid being forced to attach these styles
I hope you can give me some advice
How does JS / CSS prevent browsers from automatically filling in account passwords?
autoComplete="off"It can be solved, but the following error message will be thrown

Invalid prop: custom validator check failed for prop "autocomplete".
6 Answers
Best Answer
hushuosha answered 1 month ago

Autocomplete = “new password” Netease’s solution.

be irrelevant to the subject answered 1 month ago

Please refer to this articlePortal

Princeling answered 1 month ago

This is a problem. I solved it before. I looked for the code

Xing walks in the cloud answered 1 month ago

Add on form or inputautoComplete="off"This attribute

Tomatoes replied 1 month ago

Tried, invalid. This property is forRemember formsInstead ofRemember passwordOf

KChrise answered 1 month ago
    <input type="text" name="username"/>
    <input style="display:none" type="text" name="remembered"/>
    <input style="display:none" type="password" name="remembered"/>
    <input type="password" name="password"/>

Don’t talk about it. Go straight to the code