How to clear history of text input

本秂侑毒 提交于 2020-01-12 03:22:45

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!