I have an input of type text
, from which I have already entered value 1234
it has been saved in cache as shown below.
The problem here is that, it is extremely frustrating to select the textbox in the next row.
Is there a way to not to display that 12334
(highlighted in the screenshot) from ever being displayed through HTML markup or javascript?
I have an input of type text
, from which I have already entered value 1234
it has been saved in cache as shown below.
The problem here is that, it is extremely frustrating to select the textbox in the next row.
Is there a way to not to display that 12334
(highlighted in the screenshot) from ever being displayed through HTML markup or javascript?
3 Answers
Reset to default 11As @John pointed out, on modern browsers you can use the HTML5 valid autocomplete
attribute, in your screenshot I see many textboxes, if you want to disable autocompletion on the whole form you can set this attribute directly at the form
element:
<form name="form1" id="form1" method="post" autocomplete="off"
action="http://www.example.com/form.action">
[...]
</form>
More info:
- How to Turn Off Form Autocompletion
<input type="text" name="input" autocomplete="off" />
To apply this to all input controls, write the code below (using jQuery):
$(document).ready(function () {
$('input[type=text], input[type=password]').attr('autocomplete', 'off');
});
Autocomplete
because there might be other people who are unaware ofAutocomplete
attribute option. – dance2die Commented Oct 20, 2009 at 13:37