Sah*_*hin 0 html google-chrome angular
我有一个登录页面,我想停止自动完成并自动填写我的表单页面。
通过使用 autocomplete="off" 自动填充停止。但是当我单击输入字段(密码或用户名字段)时,自动完成仍然加载。如何停止这个自动完成?
我尝试了以下方法, autocomplete="off", autocomplete="false", autocomplete="new-password" 但它还是来了。
我的示例代码:
<form #f="ngForm" autocomplete="off">
<mat-form-field floatLabel="auto">
<mat-label>User name</mat-label>
<mat-icon matPrefix>person</mat-icon>
<input matInput
tabindex="1"
#username="ngModel"
[(ngModel)]="userName"
required
name="username"
maxlength="100"
autocomplete="off"
role="presentation">
</mat-form-field>
<mat-form-field floatLabel="auto">
<mat-label>Password</mat-label>
<mat-icon matPrefix>lock</mat-icon>
<input matInput
tabindex="2"
[(ngModel)]="password"
required
name="password"
#pass="ngModel"
type="password"
maxlength="100"
autocomplete="new-password"
role="presentation">
</mat-form-field>
</form>
Run Code Online (Sandbox Code Playgroud)
谷歌浏览器版本:76.0.3809.100 版(官方版本)(64 位)
小智 5
在自动完成和随机名称上添加“anystring”以进行标记。
autocomplete="anyrandomstring" name="test"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1291 次 |
| 最近记录: |