Skip to content

Commit

Permalink
New page: htmlformelement.autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle committed Oct 6, 2024
1 parent c56af7b commit 5196611
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions files/en-us/web/api/htmlformelement/autocomplete/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "HTMLFormElement: autocomplete property"
short-title: autocomplete
slug: Web/API/HTMLFormElement/autocomplete
page-type: web-api-instance-property
browser-compat: api.HTMLFormElement.autocomplete
---

{{ APIRef("HTML DOM") }}

The **`autocomplete`** property of the {{DOMxRef("HTMLFormElement")}} interface indicates whether the value of the form's controls can be automatically completed by the browser. It reflects the {{htmlelement("form")}} element's [`autocomplete`](/en-US/docs/Web/HTML/Attributes/autocomplete) attribute.

## Value

A string; the value of the `autocomplete` attribute (`"on"`, `"off"`), or the empty string `""` if unspecified.

## Examples

```js
const formElement = document.getElementById("name");
console.log(formElement.autocomplete);
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{HTMLElement("form")}}
- HTML [`autocomplete`](/en-US/docs/Web/HTML/Attributes/autocomplete) attribute
- ARIA [`aria-autocomplete`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-autocomplete) attribute
- [Turning off autocompletion](/en-US/docs/Web/Security/Practical_implementation_guides/Turning_off_form_autocompletion)

0 comments on commit 5196611

Please sign in to comment.