From 5196611cea796b25ce05ec539e1d9c637db58d76 Mon Sep 17 00:00:00 2001 From: estelle Date: Sat, 5 Oct 2024 18:51:23 -0700 Subject: [PATCH] New page: htmlformelement.autocomplete --- .../api/htmlformelement/autocomplete/index.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 files/en-us/web/api/htmlformelement/autocomplete/index.md diff --git a/files/en-us/web/api/htmlformelement/autocomplete/index.md b/files/en-us/web/api/htmlformelement/autocomplete/index.md new file mode 100644 index 000000000000000..c1418b469a47975 --- /dev/null +++ b/files/en-us/web/api/htmlformelement/autocomplete/index.md @@ -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)