17

I have an input in an HTML page

<input id="SearchBox" type="text" value="" width="300px" 
       title="Search the card pool" autocomplete="off" maxlength="170">

I would like to switch this off with something like autospellcheck="off". Is there a way to achieve that?

Is there also a way to switch this off for Firefox?

David Hedlund
  • 128,221
  • 31
  • 203
  • 222
Gad D Lord
  • 6,620
  • 12
  • 60
  • 106

2 Answers2

34

Use the spellcheck attribute:

<textarea spellcheck="false"></textarea>

See Spellcheck (MSDN) or Controlling spell checking in HTML forms (MDN).

Mark Amery
  • 143,130
  • 81
  • 406
  • 459
rahul
  • 184,426
  • 49
  • 232
  • 263
5

add the attribute using JQuery $('.textarea_className').attr('spellcheck',false);

I was able to do this with JQUery so that I can return 0 errors for my XHTML validation

wileez
  • 67
  • 1
  • 3