all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize

autocomplete attribute | autocomplete property

Specifies whether autocomplete is applied to an editable text field.

This property is read/write.

Internet Explorer 10

 

Syntax

HTML
<element autocomplete="sAutocompleteState" ... >

 

JavaScript
object.autocomplete = sAutocompleteState
sAutocompleteState = object.autocomplete

 

Property values

Type: DOMString

A string containing whether autocomplete is on or off.

ValueCondition
on

Turns autocomplete on.

off

Turns autocomplete off.

 

Remarks

If the autocomplete attribute is missing, the field will default to an "on" state if element has no parent form, or if the form has autocomplete set to "on".

Examples

The following example uses the autocomplete attribute to disable autocomplete on a text field.


<input type="text" autocomplete="off">

See also

HTMLFormElement
HTMLInputElement

 

 

Show:
© 2014 Microsoft