简体   繁体   English

如何从输入中删除自动完成功能?

[英]How to remove autocomplete from input?

I have tried autocomplete="off", autocomplete="none" , autocomplete="/" ,autocomplete="new-text" but still it shows autocomplete我试过 autocomplete="off", autocomplete="none" , autocomplete="/" ,autocomplete="new-text" 但它仍然显示自动完成

browser autocomplete overlaps typehead autocomplete popup浏览器自动完成重叠打字头自动完成弹出

I don't Know how to remove this autocomplete我不知道如何删除此自动完成功能

Thank you in advance!!先感谢您!!

 <form name="clientForm" class="kt-form kt-form--label-right" novalidate role="form" autocomplete="new-text"> <div class="form-group row"> <div class="col-lg-3 col-sm-6 col-xs-12 typeahead"> <label for="country">Country <span style="color:red">*</span></label><br /> <input id="add-c-country" class="form-control" name="country" type="text" dir="ltr" placeholder="Enter Country" autocomplete="new-text" /> <div class="form-text text-muted" ng-show="clientForm.country.$touched || clientForm.$submitted" ng-messages="clientForm.country.$error" role="alert"> <div class="req-red" ng-message="required">Please Select Country</div> </div> </div> </div> </form>

I am using typeahead.js for auto complete我正在使用 typeahead.js 进行自动完成

 function applyAutocomplete(id, array,namE) { $('input#' + id).typeahead({ hint: true, highlight: true, minLength: 1, accent: true, offset: true }, { name: namE, limit: 100, source: substringMatcher(array) }); } applyAutocomplete('add-c-country', $ctrl.countryNameList,'country');

在此处输入图片说明

Could you try just completely removing the autocomplete parameter?您可以尝试完全删除自动完成参数吗?

Like this:像这样:

<input id="add-c-country" class="form-control" name="country" type="text" dir="ltr" placeholder="Enter Country" />

Edit after reading your edited question:阅读您编辑的问题后进行编辑:

You can not disable browser autocomplete in your own code.您不能在自己的代码中禁用浏览器自动完成功能。 That is a browser specific setting.那是浏览器特定的设置。 For chrome you can do the following:对于 chrome,您可以执行以下操作:

  1. Click the Chrome menu icon.单击 Chrome 菜单图标。 (Three lines at the top right of the screen.) (屏幕右上角的三行。)
  2. Click on Settings.单击设置。
  3. At the bottom of the page, click 'Show advanced Settings'在页面底部,单击“显示高级设置”
  4. In the Passwords and Forms section, uncheck 'Enable Autofill to fill out web forms in a single click'.在密码和表单部分,取消选中“启用自动填充以单击即可填写网络表单”。

Hope this solves your problem.希望这能解决您的问题。

Best regards.此致。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM