On my HTML page I have multiple text inputs. Every time I enter values in them, it shows me the previously entered values. Is it due to a browser property or HTML? How do I disable it?
5 Answers
Always the better appraoch is to give form autocomplete="off"
<form autocomplete="off">
<input type="text" id="text1">
<input type="text" id="text2">
</form>
Then only newer versions of Eclipse support HTML5 tags such as autocomplete else it will show warning...
Just set the autocomplete
property of your textboxes to off. Like this...
<input type="email" name="email" autocomplete="off">
-
i tried that, it says "Undefined attribute name (autocomplete)" Jul 23, 2013 at 6:19
-
-
chrome/firefox/ie testing on all of them as I want it to work on all known bowers Jul 23, 2013 at 6:22
-
1@AdityaPonkshe to clear things up, are you getting this "Undefined attribute name (autocomplete)" in your browser or developement environment? Because googling such error directs me to eclipse problems.– IluJul 23, 2013 at 6:24
-
1@AdityaPonkshe Yeah my bad, answered the same moment I guess :) There seems to be workarounds for such problems. Not too familiar with the eclipse, but worth a try: stackoverflow.com/questions/4193905/… (just because it's annoying to see warnings)– IluJul 23, 2013 at 6:28
That solution helped me: if you are using google Chrome, try this: Put the mouse pointer on the entry that you want to delete, press Delete. If the entry is not removed, press Shift+Delete.
i think it is related to this question autocomplete
try to used javascript to add attribute autocomplete to your form
someForm.setAttribute( "autocomplete", "off" ); someFormElm.setAttribute( "autocomplete", "off" );
just try this lines below
$('input').each(function(k,v){
$(v).val('');
});
works fine with me