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.
This should work:
$("#field_id").attr("autocomplete", "off");
Or, on your html element:
<input type="text" autocomplete="off" value="" />
The new HTML5 form attribute, called autocomplete, should help you with this.
autocomplete
Use it like this:
<input type="text" name="firstName" autocomplete="off" />
Or in the whole form:
<form autocomplete="off"></form>
, , ... . HTML5 , . .