HTML input autocomplete attribute
Examples
Enable AutoComplete feature of HTML forms (one input field is disabled automatically):
First name:<input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
E-mail: <input type="email" name="email" autocomplete="off"><br>
<input type="submit">
</form>
try it"
Browser Support
All major browsers support autocomplete attribute.
Tip: In some browsers, you may need to manually enable the AutoComplete feature (set in the "Preferences" menu in your browser).
Definition and Usage
autocomplete attribute specifies whether the input field should enable the AutoComplete feature.
Automatically allows the browser to predictive input field. When users start typing in the field, based on the browser before typing over the value of the option should be displayed in the field to fill.
Note: autocomplete attribute applies to the following <input> types: text, search, url, tel , email, password, datepickers, range and color.
Differences between HTML 4.01 and HTML5
autocomplete attribute is new in HTML5 attributes.
grammar
Property Value
值 | 描述 |
---|---|
on | 默认。规定启用自动完成功能。 |
off | 规定禁用自动完成功能。 |
