当前位置:网站首页>Input type= "password" how to solve the problem of password automatically brought in

Input type= "password" how to solve the problem of password automatically brought in

2022-07-07 11:09:00 Have a good time I

use input type="password" Password box , The browser will automatically bring in the password , You can add autocomplete=“new-password”
such as

 <a-input-password v-model="password" style="width:370px;margin-left:10px;" placeholder="8-15 Characters , You have to include numbers at the same time 、 english 、 Special symbols " autocomplete="new-password" @blur="handlePassword" @change="handlePasswordChange" />

Although not prompted , But click on the input box , There will still be a saved password prompt below .

By adding onblur="this.readOnly = 'readonly'" It can solve the problem that the second click will prompt the password
perhaps
By adding readonly&onfocus =“this.removeAttribute('readonly'); That solved the problem .

<input type="password" name="Password" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');" >

 Insert picture description here

This problem will still occur above , Although the password is not brought in , But the browser still brings this kind of pop-up box when clicking , It is trouble , How to get rid of . Do not use <a-input-password > This component

<a-input type="text" class="pw" @blur="handleAgainPassword" />

<style> .pw {
       -webkit-text-security: disc; } </style>

Smooth solution :
 Insert picture description here
There are many ways on the Internet , But this method is currently the most effective .

原网站

版权声明
本文为[Have a good time I]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130619539382.html