English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The autocomplete attribute specifies whether the form should enable or disable the autocomplete feature. When the autocomplete feature is enabled, the browser will automatically complete the entry based on the user's previous input.
Form with autocomplete feature enabled:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML form autocomplete attribute usage-Basic Tutorial(oldtoolbag.com)</title> </head> <body> <form action="action_page.php" method="get" autocomplete="on"> First name:<input type="text" name="fname"><br> E-mail: <input type="email" name="email"><br> <input type="submit"> </form> <p>Fill in and submit the form, then reload the page and start filling out the form again-And check the working principle of autocomplete. Then, try setting the autocomplete feature to 'off'.</p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
Except for Opera, all major browsers support the autocomplete attribute.
The autocomplete attribute specifies whether the form should enable or disable the auto-complete feature.
After enabling the autocomplete feature, the browser will automatically fill in the form based on the user's previous entries.
Tip: You can set the form's 'auto-complete' to 'on' and the auto-complete of a specific input field to 'off', and vice versa.
The autocomplete attribute is an HTML5 of the new attribute.
<form autocomplete="on|off">
Value | Description |
---|---|
on | Default. Specifies that the auto-complete feature is enabled. The browser will automatically complete values based on the user's previous entries. |
off | Specifies that the auto-complete feature is disabled. Users must enter values into each field every time they use it, and the browser will not automatically complete the input. |