Export (0) Print
Expand All
all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize

spellcheck property

Specifies whether spell checking is applied to an editable text field.

This property is read/write.

Internet Explorer 10

Syntax

JavaScript
object.spellcheck = ptr
ptr = object.spellcheck

Property values

Type: boolean

True turns on spell checking for an element, false turns it off.

Remarks

Spellcheck is only enabled by default textArea elements, and elements with the contentEditable = true attribute for Windows Store apps using JavaScript, Internet Explorer 10, and Internet Explorer 10 for the desktop in Windows 8. Spellcheck is off by default for input type=text

Spellcheck is off by default of any element in the apps that host the web browser control (Web OC). You can enable spellchecking by adding the spellcheck=true attribute to the root or ancestor markup of the content (including the <html> element), with no other special flags needed.

There is also a default state (missing attribute) which uses the element's default behavior, such as inheriting from the parent element's spellcheck state.

Examples

The following example shows a text input element with spell checking.


<html>
<head>
    <title>Spellcheck example</title>
</head>
<body>
  <!-- Ask for some text -->
  <label>Type some words: 
  <input type="text" autofocus spellcheck="true" />
  </label>
</body>
</html>


See also

HTMLElement
HTMLInputElement
HTMLTextAreaElement
input type=email
input type=number
input type=range
input type=search
input type=tel
input type=text
input type=url
textArea

 

 

Show:
© 2014 Microsoft