html - 记住密码在 ff 中有效,但在 ie 和 chrome 中无效

标签 html internet-explorer firefox passwords google-chrome

看来我的 html 登录表单在 ff 中支持“记住密码”,但在 ie 和 chrome 中不支持。谁能告诉我为什么?这是代码:

<form name="login_form" id="login_form" action="" method="POST">
    <div class="login_line">name<input name="user_name" id="user_name_id" size="16" maxlength="16" value="" type="text"></div>
    <div class="login_line">password<input name="password" id="password_id" size="16" maxlength="16" type="password"></div>
    <div class="login_line">&nbsp;<input class="icon icon_accept" value="login" onclick="javascript:handleFunction('action_login', document.getElementById('user_name_id').value, document.getElementById('password_id').value); return false;" type="submit"></div>
</form> <!-- login_form -->

我已经检查了我在 Chrome 和 IE 中的设置。

最佳答案

您可能希望对表单使用 onsubmit 而不是 onclick...我不确定在文本框上按 Enter 是否会触发 onclick 在所有浏览器上。

<form name="login_form" id="login_form" action="" method="POST" onsubmit="handleFunction('action_login', document.getElementById('user_name_id').value, document.getElementById('password_id').value); return false;">
    <div class="login_line">name<input name="user_name" id="user_name_id" size="16" maxlength="16" value="" type="text"></div>
    <div class="login_line">password<input name="password" id="password_id" size="16" maxlength="16" type="password"></div>
    <div class="login_line">&nbsp;<input class="icon icon_accept" value="login" type="submit"></div>
</form> <!-- login_form -->

关于html - 记住密码在 ff 中有效,但在 ie 和 chrome 中无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2891719/

相关文章:

html - 通过css在打印中将标题添加到html页面

html - 为什么我的样式不适用于我的标签和输入?

ruby-on-rails - Internet Explorer 中的最大文件大小上传限制是多少?

css - Internet Explorer 不加载样式表

firefox - Firefox 需要哪些证书使用标志才能提供证书作为客户端标识符?

javascript - Firefox "onerror"即使图像无效也不会触发

html - 引用特定标签的符号不能在 SassMeister 上编译

html - 为什么 HTML 子菜单在错误的位置?

html - 更改 bootstrap .col 宽度

facebook - FB Like 按钮在 IE7 中折叠