HTML: Chrome save password

懵懂的女人 提交于 2019-12-23 15:17:02

问题


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

<body>
    <form action="" 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>

回答1:


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>



回答2:


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 -->


来源:https://stackoverflow.com/questions/15431783/html-chrome-save-password

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!