Example
<p>By default autocomplete value is 'on'</p>
<p>Acount holder:<input type='text' name='aholder'></p>
<p>PIN:<input type='password' name='pin' autocomplete='off'></p>
Try </>
Web development courses to make an interactive and responsive website.
autocomplete attribute suggests the input field values to fill automatically to facilitate the user.
<p>By default autocomplete value is 'on'</p>
<p>Acount holder:<input type='text' name='aholder'></p>
<p>PIN:<input type='password' name='pin' autocomplete='off'></p>
Try </>
By default, every element in a form hints the user different options.
But if the value of autocomplete attribute is set to off, then form does not give any hint for auto fill feature.
It is a boolean type attribute. The value of this attribute may be 'on' or 'off'.
The absence of autocomplete attribute means the autofill feature is on.
The autocomplete attribute supports the following elements.
form tag represents a form to collect the data.
<form action="address of file to process data" autocomplete="off"> </form>
input field also hints the user for auto fill feature. autofill feature of input control can be disabled individually.
<input type="text" name="fname" autocomplete="off">
autocomplete attribute is also applicable on the textarea element.
<p>change value of attribute from <b>off</b> to <b>on</b> to see the affect of autocomplete attribute.</p>
<textarea cols="20" rows="20" autocomplete="off"> </textarea>
input represents control.
form defines a form.
select offers different options.
textarea defines an editable text area.
Was this article helpful?
Email:
Message:
Get the newsletter