本文介绍了记住 passowrd 在 ff 中有效,但在 ie 和 chrome 中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!
问题描述
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"> <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"> <input class="icon icon_accept" value="login" type="submit"></div>
</form> <!-- login_form -->
这篇关于记住 passowrd 在 ff 中有效,但在 ie 和 chrome 中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!
本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!