Sometimes the spell checker is unnecessary, captchas, usernames, emails, etc. Is there a way disable it on some text inputs/text areas?
有时拼写检查是不必要的,验证码,用户名,电子邮件等。有没有办法在某些文本输入/文本区域禁用它?
2 个解决方案
#1
72
As noted by my buddy Jonathan Stark, you should be able to use attributes like autocorrect and autocomplete to achieve the effect you're looking for:
正如我的好友Jonathan Stark所说,您应该能够使用自动更正和自动完成等属性来实现您正在寻找的效果:
<input type="text" placeholder="My Field" name="myfield"
autocapitalize="none" autocorrect="off" autocomplete="off" />
Just tested in OS4 and it's working.
刚刚在OS4中测试过,它正在运行。
UPDATE: As of iOS5 on
and off
values in autocapitalize
have been deprecated. Use none
to completely disable automatic capitalization.
更新:从iOS5开始,自动资本化的开启和关闭值已被弃用。使用none可完全禁用自动大小写。
#2
49
Actually there is literally a spell check attribute in HTML5:
实际上HTML5中实际上有一个拼写检查属性:
<textarea spellcheck="false">
Re: http://blog.whatwg.org/the-road-to-html-5-spellchecking
回复:http://blog.whatwg.org/the-road-to-html-5-spellchecking
Browser support is, of course, limited.
浏览器支持当然是有限的。
#1
72
As noted by my buddy Jonathan Stark, you should be able to use attributes like autocorrect and autocomplete to achieve the effect you're looking for:
正如我的好友Jonathan Stark所说,您应该能够使用自动更正和自动完成等属性来实现您正在寻找的效果:
<input type="text" placeholder="My Field" name="myfield"
autocapitalize="none" autocorrect="off" autocomplete="off" />
Just tested in OS4 and it's working.
刚刚在OS4中测试过,它正在运行。
UPDATE: As of iOS5 on
and off
values in autocapitalize
have been deprecated. Use none
to completely disable automatic capitalization.
更新:从iOS5开始,自动资本化的开启和关闭值已被弃用。使用none可完全禁用自动大小写。
#2
49
Actually there is literally a spell check attribute in HTML5:
实际上HTML5中实际上有一个拼写检查属性:
<textarea spellcheck="false">
Re: http://blog.whatwg.org/the-road-to-html-5-spellchecking
回复:http://blog.whatwg.org/the-road-to-html-5-spellchecking
Browser support is, of course, limited.
浏览器支持当然是有限的。