![](/img/trans.png)
[英]How to remove html from search autocomplete input after click on search results?
[英]How to remove autocomplete from input?
我試過 autocomplete="off", autocomplete="none" , autocomplete="/" ,autocomplete="new-text" 但它仍然顯示自動完成
瀏覽器自動完成重疊打字頭自動完成彈出
我不知道如何刪除此自動完成功能
先感謝您!!
<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>
我正在使用 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');
您可以嘗試完全刪除自動完成參數嗎?
像這樣:
<input id="add-c-country" class="form-control" name="country" type="text" dir="ltr" placeholder="Enter Country" />
閱讀您編輯的問題后進行編輯:
您不能在自己的代碼中禁用瀏覽器自動完成功能。 那是瀏覽器特定的設置。 對於 chrome,您可以執行以下操作:
- 單擊 Chrome 菜單圖標。 (屏幕右上角的三行。)
- 單擊設置。
- 在頁面底部,單擊“顯示高級設置”
- 在密碼和表單部分,取消選中“啟用自動填充以單擊即可填寫網絡表單”。
希望這能解決您的問題。
此致。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.