Input Email autocomplete Attribute

Definition and Usage

autocomplete Attribute settings or return the value of the autocomplete attribute in the email field.

After enabling automatic completion, the browser will automatically complete values based on the values previously entered by the user.

Tip:In some browsers, you may need to enable the automatic completion feature to make it work properly (check under "Preferences" in the browser menu).

See also:

HTML Reference Manual:HTML <input> autocomplete Attribute

Instance

Example 1

Set the automatic completion of the email field to off:

document.getElementById("myEmail").autocomplete = "off";

Try it yourself

Example 2

Get the state of automatic completion:

var x = document.getElementById("myEmail").autocomplete;

Try it yourself

Syntax

Return autocomplete attribute:

emailObject.autocomplete

Set autocomplete attribute:

emailObject.autocomplete = "on|off"

Attribute value

Value Description
on Default. Browsers will auto-complete values based on the user's previous input.
off Users must enter a value in each text field every time they use it. Browsers will not auto-complete entries.

Technical Details

Return Value: A string value that represents the state of auto-complete.

Browser Support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support 10.0 Support Support Support