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
Disable Textbox suggestions
提问by Awais Qarni
Hi all you all have experienced that when you use atextbox
again and again by writing something in it and submitting the values the textbox starts to give you suggestion on the onfocus
event 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"