HTML: Chrome save password

前端 未结 2 1504
清酒与你
清酒与你 2021-01-19 09:56

Firefox and IE ask me to save the password. Why doesn\'t Chrome ask me? What do I have to change?


    
相关标签:
2条回答
  • 2021-01-19 10:18

    Your form needs a destination. Just assign action. For example create a file called "test.html" and then:

    <body>
        <form action="test.html" name="formlogin" id="formlogin">
            Username: <input type="text" name="username" id="username" />    
            Password: <input type="password" name="password" id="password"/> 
            <input type="submit" name="Submit" value="Submit" />
        </form>
    </body>
    
    0 讨论(0)
  • 2021-01-19 10:22

    I believe this question has already been adressed here.

    <form name="formlogin" id="formlogin" action="" method="POST" onsubmit="handleFunction('action_login', document.getElementById('username').value, document.getElementById('password').value); return false;">
            Username: <input name="username" id="username" size="16" maxlength="16" value="" type="text">
            Password: <input name="password" id="password" size="16" maxlength="16" type="password">
            <input type="submit" name="submit" value="Submit">
    </form> <!-- login_form -->
    
    0 讨论(0)
提交回复
热议问题