Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
422 views
in Technique[技术] by (71.8m points)

html - 通过HTML / css关闭Chrome / Safari拼写检查(Turn off Chrome/Safari spell checking by HTML/css)

Is there a way for a web developer to turn off Chrome/Safari/WebKit's spellchecking on particular input or textarea elements?

(网络开发人员是否可以关闭特定inputtextarea元素的Chrome / Safari / WebKit的拼写检查?)

I mean either by special tag attribute or a proprietary CSS instruction.

(我的意思是通过特殊标签属性或专有的CSS指令。)

There is a CSS instruction for turning off outlining of input s so I thought that might also exist.

(有一条CSS指令可以关闭input的轮廓,所以我认为这也可能存在。)

I know how a user can do it.

(我知道用户怎么做。)

Or, as a user, can I disable it for some particular domain?

(或者,作为用户,我可以在某些特定域中禁用它吗?)

  ask by tillda translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Yes, there is the HTML5 spellcheck attribute.

(是的,有HTML5拼写检查属性。)

<textarea spellcheck="false"> or <input type="text" spellcheck="false">

(<textarea spellcheck="false"><input type="text" spellcheck="false">)

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

(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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...