Latest web development tutorials

HTML DOM Input Email autocomplete attribute

Input Email Object Reference Input Email Object

Examples

Set email fields autocomplete attribute to off (closed):

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

try it"


Definitions and use

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

When autocomplete is on (open), the browser until the user based on the value entered automatically entered.

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


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support autocomplete attribute.

Note: Opera 12 and earlier versions of the browser does not support autocomplete attribute.

Note: Internet Explorer 9 and earlier versions of IE, Safari browser does not support <input type = "email"> element.


grammar

Back autocomplete attribute:

emailObject .autocomplete

Setting autocomplete attribute:

emailObject .autocomplete = "on | off"

Property Value

value description
on default. Enabled value based on the input before the user had to autocomplete function.
off Disable AutoComplete feature, a user will need to enter their own values.

technical details

return value: String that represents the auto-complete state


More examples

Examples

Get automatic completion status:

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

x The output is:

on

try it"


Related Pages

HTML Reference Manual: HTML <the INPUT> AutoComplete property


Input Email Object Reference Input Email Object