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

前提是你 提交于 2019-12-04 15:00:03

问题


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


回答1:


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

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




回答2:


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




回答3:


Try adding the following code to your textarea:

 spellcheck="false"


来源:https://stackoverflow.com/questions/3496658/html-how-can-i-disable-auto-text-correction-in-my-textarea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!