开发者

HTML - How can i disable auto text correction in my TEXTAREA?

My textarea contains C# code, so i get red underlines all over the place, is there any way to disable auto correction on a TEXTAREA 开发者_开发技巧in html code?

Thank


I believe you may be looking for <textarea spellcheck="false"></textarea>

Source: https://developer.mozilla.org/en/controlling_spell_checking_in_html_forms


There are two more attributes other than spellcheck="false" for iOS (probably Android too) that you might need to add to your text inputs to avoid OS interferer with text content:

  • autocorrect="off" for avoiding to complete or suggest a word
  • autocapitalize="off" for avoiding OS transforming book to Book
  • spellcheck="false" for avoiding OS from highlighting spell errors

HTML - How can i disable auto text correction in my TEXTAREA?


Try adding the following code to your textarea:

 spellcheck="false"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜