如何防止 MobileSafari/UIWebView 中的键盘自动完成?

发布于 2024-11-17 01:37:39 字数 115 浏览 3 评论 0原文

我正在 上实现我自己的自动完成功能UIWebView 内的字段,内置键盘自动完成功能会干扰用户体验。有没有办法使用 HTML 或 Javascript 向 iOS 发出信号,表明它不应该尝试自动完成?

I'm implementing my own autocompletion on an <input> field inside a UIWebView, and the built-in keyboard autocompletion interferes with the user experience. Is there a way to use HTML or Javascript to signal to iOS that it shouldn't try to autocomplete?

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

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

发布评论

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

评论(1

〃安静 2024-11-24 01:37:39

在我的评论中,我提到使用 html 属性 autocomplete 但我测试了它,它不能解决您的问题。不过,Mobile Safari 特有的一个属性可能会有所帮助。您可以尝试关闭自动更正,如下所示:

<input type="text" id="your-field" autocorrect="off" />

In my comments I mentioned using the html attribute autocomplete but I tested it, and it doesn't address your issue. However, there is an attribute specific to Mobile Safari which may help. You could try turning off autocorrect like so:

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