通过 HTML/css 关闭 Chrome/Safari 拼写检查
有没有办法让 Web 开发人员关闭 Chrome/Safari/WebKit 对特定 input
或 textarea
元素的拼写检查?我的意思是通过特殊标签属性或专有 CSS 指令。
有一个 CSS 指令用于关闭输入的大纲,所以我认为这也可能存在。我知道用户如何做到这一点。
或者,作为用户,我可以针对某些特定域禁用它吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
是的,有 HTML5 拼写检查属性。
或http://www.whatwg.org/specs/web-apps /current-work/multipage/editing.html#spelling-and-grammar-checking
更新:现在所有浏览器的最新版本都支持此功能。
Yes, there is the HTML5 spellcheck attribute.
<textarea spellcheck="false">
or<input type="text" spellcheck="false">
http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#spelling-and-grammar-checking
Update: This is now supported in the latest versions of all browsers.
这适用于 Safari 7.1,也应该适用于其他版本:
只有
spellcheck="false"
不起作用。This works in Safari 7.1 and should work also in others:
Only
spellcheck="false"
didn't work.对于表单的所有元素都是可能的,因此:
for all elements of a form it is possible and so:
在 React 中,你必须使用
spellCheck
来代替。In React, you gotta use
spellCheck
instead.关于输入标签的概述:不要这样做,这是给用户的视觉提示。
但如果你必须:
Regarding outlining of input tags: don't do it, it's a visual cue for users.
But if you must: