禁用 HTML 文本字段的拼写检查 [英] Disable spell-checking on HTML textfields

查看:38
本文介绍了禁用 HTML 文本字段的拼写检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能否以某种方式禁用对 HTML 文本字段的拼写检查(如 Safari 中所见)?

Can I somehow disable spell-checking on HTML textfields (as seen in e.g. Safari)?

推荐答案

更新:正如评论者所建议的(额外归功于 如何禁用 iPhone 上文本输入的拼写检查器),使用这个处理所有桌面和移动浏览器.

Update: As suggested by a commenter (additional credit to How can I disable the spell checker on text inputs on the iPhone), use this to handle all desktop and mobile browsers.

<tag autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>

原始答案:Javascript 无法覆盖用户设置,因此除非您使用文本字段以外的其他机制,否则这不可能(或不应该).

Original answer: Javascript cannot override user settings, so unless you use another mechanism other than textfields, this is not (or shouldn't be) possible.

这篇关于禁用 HTML 文本字段的拼写检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆