通过HTML/css关闭Chrome/Safari拼写检查

til*_*lda 117 html css google-chrome spell-checking

有没有办法让网络开发人员关闭Chrome/Safari/WebKit对特定inputtextarea元素的拼写检查?我指的是特殊标签属性或专有CSS指令.

有一个CSS指令用于关闭inputs的概述,所以我认为也可能存在.我知道用户如何做到这一点.

或者,作为用户,我可以为某个特定域禁用它吗?

Gau*_*rav 201

是的,有HTML5拼写检查属性.

<textarea spellcheck="false"> 要么 <input type="text" spellcheck="false">

http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#spelling-and-grammar-checking

更新:现在所有浏览器的最新版本都支持此功能.


Tim*_*nen 35

这适用于Safari 7.1,也适用于其他人:

<input autocomplete="off" autocorrect="off" autocapitalize="off" 
spellcheck="false"/>
Run Code Online (Sandbox Code Playgroud)

只是spellcheck="false"没工作.


小智 6

对于表单的所有元素,它是可能的,因此:

<form spellcheck="false" .. />
Run Code Online (Sandbox Code Playgroud)


Pau*_*erg 5

在 React 中,你必须使用spellCheck

<input spellCheck={false} type="text"/>
Run Code Online (Sandbox Code Playgroud)