Input Email autocomplete Property

❮ Input Email Object

Example

Set autocomplete in an email field to off:

document.getElementById("myEmail").autocomplete = "off";
Try it Yourself »

Description

The autocomplete property sets or returns the value of the autocomplete attribute in a email field.

When autocomplete is on, the browser automatically complete values based on values that the user has entered before.

Tip: In some browsers you may need to activate an autocomplete function for this to work (Look under "Preferences" in the browser's menu).


Browser Support

Property
autocomplete Yes 10.0 Yes Yes Yes


Syntax

Return the autocomplete property:

emailObject.autocomplete

Set the autocomplete property:

emailObject.autocomplete = "on|off"

Property Values

Value Description
on Default. The browser will automatically complete values based on values that the user has entered before
off The user must enter a value into each text field for every use. The browser does not automatically complete entries

Technical Details

Return Value: A String, representing the state of autocompletion

More Examples

Example

Get the state of autocompletion:

var x = document.getElementById("myEmail").autocomplete;
Try it Yourself »

Related Pages

HTML reference: HTML <input> autocomplete Attribute


❮ Input Email Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.