spellcheck property
Sets or retrieves whether the automatic spellchecker is enabled.
The internal spellchecker is a great solution in Firefox, Google Chrome and Safari, but useless in most cases,
because the user must install different language packs to use it correctly.
The browser checks whether the required language pack is installed, and if not, it uses the default.
It does not alert the user to install the required language pack, so almost all content will be underlined.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: spellcheck |
Possible values:
Boolean that indicates the state of spellcheck.
The auto-spellcheck is disabled. | |||||||
Default. The auto-spellcheck is enabled. |
Default: true.
Example HTML code 1:
This example illustrates the use of the spellcheck attribute:
|
||||
<textarea spellcheck="true">Some content in the textarea</textarea> <textarea spellcheck="false">Some content in the textarea</textarea> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the spellcheck property:
|
||||
<head> <script type="text/javascript"> function ToggleSpellCheck () { var area = document.getElementById ("myArea"); if ('spellcheck' in area) { area.spellcheck = !area.spellcheck; } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <textarea spellcheck="false" id="myArea">Some content in the textarea</textarea> <button onclick="ToggleSpellCheck ();">Change the state of spellcheck!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
a, abbr, acronym, address, b, bdo, big, blockquote, body, button, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, html, i, input:text, ins, isindex, kbd, label, legend, li, listing, menu, nobr, ol, p, plaintext, pre, q, s, samp, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp
User Contributed Comments