禁用 HTML TextField 下拉建议框
好吧,你知道什么时候在文本字段中输入“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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 autocomplete="off" 就像 Google 主页一样
Use autocomplete="off" as in Google homepage
这是浏览器的功能,而不是 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.
我认为这是浏览器的一个功能,关闭它的方法会有所不同。不过,我认为这不是你能够用代码完成的事情。
我刚刚检查了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.