Today, to share a clear input input box history example explanation, has a good reference value, I hope to help you. Come and have a look with her

Clear the history of the input field by adding autoComplete =”off” to the input field.

<form action="demo_form.asp" method="get">
  E-mail: <input type="email" name="email" autocomplete="off" /><br />
  <input type="submit" />
</form>
Copy the code

The autocomplete property specifies whether the input field should be auto-complete enabled.

Autocomplete allows the browser to anticipate the entry of fields. When the user starts typing in the field, the browser should display the options to fill in the field based on the values you typed earlier.

The input attribute autocomplete defaults to ON, meaning whether to let the browser automatically record previously entered values

Note: The autocomplete attribute applies to <form>, as well as the following <input> types: Text, search, URL, telephone, email, password, Datepickers, range and color.

grammar

<input autocomplete="value">
Copy the code

Attribute values

value describe
on The default. Specifies that auto complete is enabled.
off Disable the autocomplete function.