autocomplete ='off'在firefox上无法正常工作 [英] autocomplete = 'off' is not working on firefox

查看:173
本文介绍了autocomplete ='off'在firefox上无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正面临浏览器问题:

我创建了2个相同域的登录页面。


  1. www.example.com/login.cfm

  2. www.example.com/newLogin。 cfm

我把这两个页面的表单名称与2个表单不同。另外,我为第二个表单和文本字段添加了 autocomplete ='off'(但是第一个表单打开)。



现在,如果我在浏览器中从 www.testDomain.com/login.cfm 登录时保存用户名和密码,那么即使自动完成关闭,用户名列表也会自动填充到第二个登录页面的用户名字段中。为了安全起见,我需要阻止这个。有没有办法做到这一点?

解决方案

在用户名和密码之间放置一个隐藏的空文本字段

 < input type =textname =username> 
<! - 禁用自动完成功能 - >< input type =textstyle =display:none>
< input type =passwordname =password>


I am facing a browser issue:

I created 2 login pages of same domain.

  1. www.example.com/login.cfm
  2. www.example.com/newLogin.cfm

I put the form name different for 2 forms with in these two page. Also I put autocomplete = 'off' for the second form and for the text fields within that form.(But it is on for first form ).

Now if I save the username and password at the time of login from www.testDomain.com/login.cfm in browser, then the list of usernames are auto populating in the username field of second login page even if the auto Complete is off. I need to block this for security reasons. Is there any way to do this? I am using FireFox V21.

解决方案

put a hidden empty text field between username and password

<input type="text" name="username">
<!-- disables autocomplete --><input type="text" style="display:none">
<input type="password" name="password">

这篇关于autocomplete ='off'在firefox上无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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