How does the html5 spellcheck attribute work?

前端 未结 3 1853
暗喜
暗喜 2021-01-18 22:51

How does the html5 spellcheck attribute work?

I am seeing this page with Chrome 17, which is supposed to support spellcheck on

相关标签:
3条回答
  • 2021-01-18 23:32

    The spellcheck attribute is still poorly (if at all) implemented in browsers. For example, when I visit the page you mention in Chrome 18 and type misspelled words into the box “This text area should be checked for mispelled words.” the browser marks “words” as misspelled. Double clicking on some other word makes it indicated as misspelled, too. The explanation is that I had Spanish set as the spellchecking language. Note: This language can be changed by right-clicking on the input are and selecting the spellcheck settings, but the change does not take effect before the page is reloaded.

    So check out those settings in your browser. Note that there’s a checkbox there that controls whether spellchecking is in use at all.

    0 讨论(0)
  • 2021-01-18 23:32

    Support has improved over time. This is an updated table:

    Few things to consider:

    • Default value depends on the element and browser. Generally, contenteditable and <textarea> behave as if it were set to “true”, and <input> behave as if it were set to false.
    • Spellcheck does not impact validation.
    • Android provides autosuggest, but doesn’t support spellcheck.

    More info: MDN article, Wuffo article, Latest comparison table

    0 讨论(0)
  • 2021-01-18 23:46

    See this working example applied to a text area. That is working in safari, chrome and firefox for me. If not, please provide information about what OS you use. Browser support is currently limited, as you can see below.

    table of support

    0 讨论(0)
提交回复
热议问题