Click here to Skip to main content
15,867,939 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
HTML
<pre><pre>
 <div id="Login-body" class="clearfix">
        <ul>
            <li>
                <span>UserName: </span>
                <input id="UserName0">
            </li>
            <li>
                <span>Password: </span>
                <input id="Password" type="password">
            </li>
            <li>
                <span>Confirm Password: </span>
                <input type="password" id="Password0">
            </li>
        </ul>
    </div>


What I have tried:

Automatically Fillup from browser
Posted
Updated 18-Feb-19 4:24am
v4
Comments
Afzaal Ahmad Zeeshan 16-Feb-19 7:33am    
You want to enable or disable the autocomplete? In HTML5, you can use autocomplete="off|on", and use this feature of the browser.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#autocomplete

<input>: The Input (Form Input) element - HTML: HyperText Markup Language | MDN[^]
JavaScript
<ul>
  <li>
    <span>UserName: </span>
    <input id="UserName0">
  </li>
  <li>
    <span>Password: </span>
    <input id="Password" type="password">
  </li>
  <li>
    <span>Confirm Password: </span>
    <input type="password" id="Password0" autocomplete="off">
  </li>
</ul>
 
Share this answer
 
Quote:
How to auto complete off or stop in userid password field

A very good tutorial site about web dev:
HTML input autocomplete Attribute[^]
 
Share this answer
 
You generally can't disable the browser's autocomplete options for login fields:
Modern browsers implement integrated password management ... For this reason, many modern browsers do not support autocomplete="off" for login fields ... This is the behavior in Firefox (since version 38), Google Chrome (since 34), and Internet Explorer (since version 11).

It makes life slightly more complicated if you're writing a user management page. But unfortunately, too many people turned off autocomplete on login forms to try to block the browser's built-in password manager. Doing that makes your site less secure, so browsers started ignoring it.

Don't try to make life harder for your users. Let them make the decision of whether or not to let their browser store their credentials. There is no valid reason for you to block that.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900