Html 删除文本框下拉建议
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9323639/
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
remove text box drop down suggestions
提问by moesef
I have a text input where people type and send text. I don't want the text box to have a drop down box with suggestions based on previous inputs. How do i remove this textbox drop down box? (I know its gonna be a simple 1 line of code but I can't find it :P)
我有一个文本输入,人们可以在其中输入和发送文本。我不希望文本框有一个下拉框,其中包含基于先前输入的建议。如何删除此文本框下拉框?(我知道它会是一个简单的 1 行代码,但我找不到它:P)
回答by DragonWork
Try this attribute in your input tag:
在你的输入标签中试试这个属性:
autocomplete="off"
回答by IanW
This should do it
这应该做
<input type="text" autocomplete="off" />
回答by Setareh Afshari
you can try this
<input type="text" autocomplete="new-password" />
你可以试试这个
<input type="text" autocomplete="new-password" />