Html 禁用文本框建议

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6205518/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 08:52:42  来源:igfitidea点击:

Disable Textbox suggestions

htmltextbox

提问by Awais Qarni

Hi all you all have experienced that when you use atextboxagain and again by writing something in it and submitting the values the textbox starts to give you suggestion on the onfocusevent based on previous written values. Can we disable this attribute of the textbox that it shouldn't suggest previous values?

大家好,当您textbox通过在其中写入内容并提交值一次又一次地使用 a时,文本框开始onfocus根据以前的写入值为您提供有关事件的建议。我们可以禁用不应建议先前值的文本框的此属性吗?

回答by Senad Me?kin

autocomplete="off" add this as attribute to your control e.g.

autocomplete="off" 将此作为属性添加到您的控件中,例如

<input type="text" autocomplete="off" />

回答by Manu Joseph

You can try this code

你可以试试这个代码

<input autocomplete="nope" name="clent_email" id="clent_email" type="text">

<input autocomplete="nope" name="clent_email" id="clent_email" type="text">

change autocomplete="off"to autocomplete="nope"

autocomplete="off"更改为autocomplete="nope"