为什么chrome不认识这个登录表单? [英] why doesn't chrome recognize this login form?

查看:169
本文介绍了为什么chrome不认识这个登录表单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网络应用中使用了以下登录表单。它在IE7,FF3.6和Chrome7.0中工作正常。除了Chrome似乎无法将此表单识别为登录表单并因此不提供保存用户名/密码的事实。 FF和IE都让我记住用户名/密码。



以下是表格:

 < form name =login_formid =login_formaction =method =POSTonsubmit =javascript: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>< input type = submit class =icon icon_acceptvalue =login>< / div>
< / form> <! - login_form - >

编辑:我使用jquery(不一致,因为您可以看到),qTip(显示任何登录错误)和Xajax(作为ajax框架)。 handleFunction如下:

 函数handleFunction(functionName)
{
//移除任何静态qtip ($('#qtip_close_button')。length)
{
//点击qtip
$ ;
}

//从参数列表中删除第一个参数
var argArray = $ .makeArray(arguments).slice(1);

xajax.request({xjxfun:functionName},{parameters:argArray});

$ / code>

感谢您的任何建议!


$ b $顺便说一下:我检查了我的主机是否在Chrome的已保存密码例外列表中。它不是。

解决方案

我相信这是因为表单实际上并未被提交。如果您检查onsubmit属性,您可以看到它在最后返回false,这会取消提交。


I'm using the following login form in my web app. It works fine in IE7, FF3.6 and Chrome7.0. Except for the fact that Chrome does not seem to recognize this form as a login form and therefore does not offer me to save the username/password. Both FF and IE do offer me to remember the username/password.

Here's the form:

<form name="login_form" id="login_form" action="" method="POST" onsubmit="javascript: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 type=submit class="icon icon_accept" value="login"></div> 
</form> <!-- login_form --> 

EDIT: I use jquery (not consistently as you can see), qTip (to show any login errors) and Xajax (as ajax framework). The handleFunction is as follows:

function handleFunction (functionName)
{
    // remove any static qtip from screen
    if ( $('#qtip_close_button').length )
    {
        // click on close button of qtip
        $('#qtip_close_button').click();
    }

    // remove the first argument from the arguments list
    var argArray = $.makeArray(arguments).slice(1);

    xajax.request({ xjxfun : functionName }, { parameters : argArray });
}

Thanks for any advise!

By the way: I checked if my host is in the saved password exceptions list of Chrome. It is not.

解决方案

I believe it is because the form is not actually being "submitted". If you check the onsubmit attribute, you can see that it returns false at the end, which cancels the submission.

这篇关于为什么chrome不认识这个登录表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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