我有一个简单的表单,我需要禁用 Angular 表单的自动填充/自动完成。
我在 StackOverflow 上搜索过,但没有找到解决方案。
我使用了 autocomplete="off"或 autocomplete="false"但自动完成从未被禁用。
有时,当我加载页面时,自动完成功能会暂时禁用。但是,一段时间后,当我重新加载页面时,问题再次出现。
//来自上图的标记
<input type="text" class="form-control input-lg ng-pristine ng-empty ng-invalid ng-invalid-required ng-touched" capitalize-full="" ng-model="user.ENDERECO" required="" placeholder="Digite seu endereço" autocomplete="off" name="street" style="opacity: 1; text-transform: uppercase;">
//标记示例
<form class="form form-horizontal" name="regForm"
autocomplete="false" novalidate role="form">
<input type="text" class="form-control input-lg"
name="cpf" ng-model="user.CPF" placeholder="Digite seu CPF"
required autocomplete="false" >
</form>
最佳答案
2018 年 4 月:在表单上设置 autocomplete="off"
对我有效(在 Chrome 上测试)。在单个元素上设置此属性无效。
关于jquery - 使用 Angular 形式和 chrome 禁用自动填充/自动完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48084770/