删除文本框下拉建议

发布于 2025-01-06 20:23:07 字数 101 浏览 2 评论 0原文

我有一个文本输入,人们可以在其中输入和发送文本。我不希望文本框有一个下拉框,其中包含基于先前输入的建议。如何删除这个文本框下拉框? (我知道这将是一个简单的 1 行代码,但我找不到它:P)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

沫雨熙 2025-01-13 20:23:07

在您的输入标记中尝试此属性:

autocomplete="off"

Try this attribute in your input tag:

autocomplete="off"
初雪 2025-01-13 20:23:07

这应该可以做到

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

This should do it

<input type="text" autocomplete="off" />
生来就爱笑 2025-01-13 20:23:07

你可以试试这个

you can try this
<input type="text" autocomplete="new-password" />

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文