问题
In my html page I have multiple text inputs. Every time I enter values in them it shows me previously entered values. Is it due to browser property or html? how do I disable it?
回答1:
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...
回答2:
Just set the autocomplete property of your textboxes to off. Like this...
<input type="email" name="email" autocomplete="off">
回答3:
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" );
来源:https://stackoverflow.com/questions/17802690/how-to-clear-history-of-text-input