我遇到了一个困境,我需要一个标准文本输入框来充当没有 type=password 属性的密码输入。
原因是应用程序出于特定原因不希望由它触发密码管理器。
基本上我在想
<script>
var mypw ="";
</script>
<input type="text" onkeydown="updatethis(this)" onpaste="updatethis(this)">
在此之后我迷失了,但不知何故我希望将密码存储在 mypw 中,并且输入仅显示安全字符。
同样,需求非常独特,但我需要避免密码管理器在这种情况下触发。
最佳答案
你的意思是类似的东西?
input{
-webkit-text-security: disc;
}
First name:<br>
<input type="text" name="firstname">
关于html - 使用文本输入作为密码 html JavaScript 但不使用 type=password,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37177478/