English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <input> autocomplete Eigenschaft

Die autocomplete-Eigenschaft legt fest, ob die automatische Vervollständigungsfunktion für das Eingabefeld aktiviert werden soll. Die automatische Vervollständigung ermöglicht es dem Browser, Werte vorherzusagen. Wenn der Benutzer mit der Eingabe im Feld beginnt, sollte der Browser Optionen anzeigen, die für das Ausfüllen des Felds verwendet werden können, basierend auf den früheren Eingaben.

 HTML <input> Tag

Online-Beispiel

HTML-Formular mit der automatischen Vervollständigungsfunktion aktiviert (und in einem Eingabefeld deaktiviert):

<!DOCTYPE html>
<html>
<head>
<title>HTML: <input> autocomplete Eigenschaft - Grundlegende Anleitung (oldtoolbag.com)</title>
<body>
<form action="action_page.php" autocomplete="on">
  Vorname: <input type="text" name="fname"><br>
  Nachname: <input type="text" name="lname"><br>
  E-mail: <input type="email" name="email" autocomplete="off"><br>
  <input type="submit">
</form>
</body>
</html>
Testen Sie es heraus ‹/›
Füllen und Einreichen des Formulars und dann Neuladen der Seite, um die Funktionsweise der automatischen Vervollständigung zu überprüfen.
Bitte beachten Sie, dass die automatische Vervollständigungsfunktion für das Formular auf „ein“ und für das E-Mail-Feld auf „aus“ eingestellt ist.

Browserkompatibilität

IEFirefoxOperChromeSafari

All major browsers support the autocomplete attribute.

Tip:In some browsers, you may need to enable the auto-complete feature for it to work (check under "Preferences" in the browser menu).

Definition and Usage

The autocomplete attribute specifies whether the auto-complete feature should be enabled for the input field.

The auto-complete feature allows the browser to predict values. When the user starts typing in the field, the browser should display options for filling the field based on the earlier entered values.

Note:The autocomplete attribute is applicable to the following <input> types: text, search, url, tel, email, password, datepickers, range, and color.

HTML 4.01 and HTML5Difference Between

The autocomplete attribute is an HTML5 New Attribute Added.

Syntax

<input autocomplete="on|off">

Attribute Value

ValueDescription
onDefault. Specify the enable auto-complete feature.
offSpecify the disable auto-complete feature.
 HTML <input> Tag