禁用 HTML TextField 下拉建议框

发布于 2024-09-18 11:59:21 字数 96 浏览 0 评论 0原文

好吧,你知道什么时候在文本字段中输入“test”等内容,然后返回,当你输入“t”时,它会建议“test”?如何禁用下拉建议框的文本字段?

如果有可能的话——谢谢。

Ok so you know when type something the textfield such as "test" and then go back and it will suggest "test" when you type in "t"? How do I disable the textfield from doign that drop down suggestion box?

If at all, possible - thanks.

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

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

发布评论

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

评论(3

拍不死你 2024-09-25 11:59:21

使用 autocomplete="off" 就像 Google 主页一样

Use autocomplete="off" as in Google homepage

星星的轨迹 2024-09-25 11:59:21

这是浏览器的功能,而不是 HTML 的功能。如果您希望浏览器停止这样做,请关闭“自动建议”或“自动完成”或特定浏览器中调用的任何功能。

That's a feature of the browser, not of your HTML. If you want your browser to stop doing that, turn off "Auto Suggest" or "Auto Complete" or whatever the feature is called in your particular browser.

你对谁都笑 2024-09-25 11:59:21

我认为这是浏览器的一个功能,关闭它的方法会有所不同。不过,我认为这不是你能够用代码完成的事情。

我刚刚检查了IE8,你可以去工具->互联网选项 ->内容,单击“自动完成”下的“设置”按钮,然后取消选中“表单”框。

I think that's a function of the browser, and the way to turn it off would vary. It's not something I think you'd be able to do in code, though.

I just checked IE8 and you can go to Tools -> Internet Options -> Content, click the Settings button under AutoComplete, and then untick the Forms box.

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