记住passowrd在ff中工作,但不在ie和chrome中 [英] remember passowrd works in ff but not in ie and chrome

查看:148
本文介绍了记住passowrd在ff中工作,但不在ie和chrome中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看来我的html登录表单在ff中支持记住密码,但不支持ie和chrome。有人可以告诉我为什么?代码如下:
$ b $ pre $ < form name =login_formid =login_formaction =method =POST >
< div class =login_line> name< input name =user_nameid =user_name_idsize =16maxlength =16value =type =text> / DIV>
< div class =login_line>密码< input name =passwordid =password_idsize =16maxlength =16type =password>< / div>
< div class =login_line>& nbsp;< input class =icon icon_acceptvalue =loginonclick =javascript:handleFunction('action_login',document.getElementById('user_name_id' ).value,document.getElementById('password_id').value); return false;类型= 提交 >< / DIV>
< / form> <! - login_form - >

我在Chrome和IE中检查了我的设置。您可能希望使用 onsubmit 而不是 onclick 对于窗体...我不确定在文本框上按下Enter将在所有浏览器上触发 onclick

 < form name =login_formid =login_formaction =method =POSTonsubmit =handleFunction('action_login',document.getElementById('user_name_id')。 value,document.getElementById('password_id')。value); return false;> 
< div class =login_line> name< input name =user_nameid =user_name_idsize =16maxlength =16value =type =text> / DIV>
< div class =login_line>密码< input name =passwordid =password_idsize =16maxlength =16type =password>< / div>
< div class =login_line>& nbsp;< input class =icon icon_acceptvalue =logintype =submit>< / div>
< / form> <! - login_form - >


It seems that my html login form supports "remember password" in ff but not in ie and chrome. Can anybody tell me why? Here's the code:

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

I've checked my settings in Chrome and IE.

解决方案

You might want to use onsubmit instead of onclick for forms... I'm not sure if pressing Enter on a textbox will fire onclick on all browsers.

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

这篇关于记住passowrd在ff中工作,但不在ie和chrome中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆