EN
HTML - disable input autocomplete
0 points
In this article, we would like to show you how to disable input element autocomplete in HTML.
Quick solution:
xxxxxxxxxx
1
<input type="text" autocomplete="off" />
In this example, we use the input
element's autocomplete="off"
attribute to disable the input
autocomplete.
xxxxxxxxxx
1
2
<html>
3
<body>
4
<form>
5
<label>
6
<span>Field 1:</span>
7
<input type="text" name="field-1" autocomplete="off" />
8
</label>
9
<br />
10
<label>
11
<span>Field 2:</span>
12
<input type="text" name="field-2" autocomplete="off" />
13
</label>
14
</form>
15
</body>
16
</html>
Note:
You can also turn disable autocomplete for the whole
form
element:xxxxxxxxxx
1<form autocomplete="off"></form>