Easy Tutorial
❮ Prop Style Animationdirection Jsref Sqrt1 2 ❯

Input Email autocomplete Attribute

Input Email Object

Example

Set the autocomplete attribute of the email field to off (disable):

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

Definition and Usage

The autocomplete attribute is used to set or return the value of the autocomplete attribute of an email field.

When autocomplete is on (enabled), the browser automatically completes the input based on values the user has entered before.

Tip: In some browsers, you may need to activate the autocomplete function to achieve this effect.


Browser Support

All major browsers support the autocomplete attribute.

Note: Opera 12 and earlier versions do not support the autocomplete attribute.

Note: Internet Explorer 9 and earlier versions, and Safari do not support the <input type="email"> element.


Syntax

Return the autocomplete attribute:

Set the autocomplete attribute:

Attribute Values

Value Description
on Default. Enables the auto-complete feature based on previously entered values by the user.
off Disables the auto-complete feature, requiring the user to manually enter values each time.

Technical Details

| Return Value: | String, representing the state of auto-complete | | --- | --- |


More Examples

Example

Get the auto-complete state:

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

x outputs:

on

Related Pages

HTML Reference: HTML <input> autocomplete Attribute


Input Email Object

❮ Prop Style Animationdirection Jsref Sqrt1 2 ❯