HTML <button> autocomplete Attribute

❮ HTML <button> tag

Example

<button type="button" autocomplete="off">Click Me!</button>

Meaning

This attribute on a <button> is nonstandard and Firefox-specific. Unlike other browsers, Firefox persists the dynamic disabled state of a <button> across page loads. Setting autocomplete="off" on the button disables this feature.

This is a "feature" of Firefox which remembers form input values across page refreshes. To fix this behavior, you simply set autocomplete="off" on the form containing the inputs, or just directly to the input.

This stops autocomplete from working and prevents the browser from remembering the state of input fields.


Standard Syntax

<button type="button|reset|submit" autocomplete="on|off">



Browser Support




Status







Attribute Values

Value Description
on Absence of this attribute is by default on there no need to specify this attribute. Specifies autocomplete should be on.
off Specifies autocomplete should be off.
❮ HTML <button> tag