Clear form history with jQuery

Is there a way to clear form history using jQuery .

I have a form and I can view the history of input elements in the drop-down list. I am surprised if I can clear the history of input fields using javascript or jQuery.

+3
source share
2 answers

This should work:

$("#field_id").attr("autocomplete", "off");

Or, on your html element:

<input type="text" autocomplete="off" value="" />
+2
source

The new HTML5 form attribute, called autocomplete, should help you with this.

Use it like this:

<input type="text" name="firstName" autocomplete="off" />

Or in the whole form:

<form autocomplete="off"></form>

, , ... . HTML5 , . .

0

All Articles