YouTip LogoYouTip

Prop Email Autocomplete

## JavaScript DOM: Input Email autocomplete Property The `autocomplete` property of the Input Email object is used to set or return the value of the `autocomplete` attribute of an email input field. When autocomplete is enabled (`on`), the browser automatically suggests values based on what the user has previously entered in that field. --- ## Syntax ### Get the autocomplete state: ```javascript emailObject.autocomplete ``` ### Set the autocomplete state: ```javascript emailObject.autocomplete = "on|off" ``` --- ## Property Values | Value | Description | | :--- | :--- | | `on` | **Default.** Enables the autocomplete feature. The browser will suggest previously entered email addresses. | | `off` | Disables the autocomplete feature. The user must manually type the full email address every time. | --- ## Technical Details | Detail | Description | | :--- | :--- | | **Return Value** | A String representing the autocomplete state (`"on"` or `"off"`). | | **DOM Version** | HTML DOM Level 5 | --- ## Code Examples ### Example 1: Disable Autocomplete for an Email Field This example turns off the autocomplete feature for a specific email input field. ```html
Email:
``` ### Example 2: Get the Current Autocomplete State This example retrieves and displays the current autocomplete status of the email input field. ```html
Email:
``` --- ## Browser Compatibility and Considerations | Browser | Supported | | :--- | :--- | | Google Chrome | Yes | | Mozilla Firefox | Yes | | Microsoft Edge / IE | Yes (IE 10+) | | Safari | Yes | | Opera | Yes (Opera 15+) | ### Important Considerations: * **Browser Settings:** In some browsers, users must have the autocomplete feature enabled in their browser settings for this property to take effect. * **Legacy Browser Support:** * The `` element is not supported in Internet Explorer 9 and earlier, or in older versions of Safari. * Opera 12 and earlier versions do not support the `autocomplete` property. --- ## Related Pages * **HTML Reference:** [HTML \ autocomplete Attribute](https://www.w3schools.com/tags/att_input_autocomplete.asp) * **JavaScript Reference:** (dom-obj-email.html)
← Prop Email DefaultvaluePython Chinese Encoding β†’