【问题标题】:auto fill not working in firefox and IE自动填充在 Firefox 和 IE 中不起作用
【发布时间】:2014-11-23 16:11:33
【问题描述】:

我希望在用户已经登录网站时自动填充我的用户名和密码,我已通过以下代码启用自动填充。当用户下次访问时,我希望用户名和密码字段都应该预先填充。

<form autocomplete="on">

<input type="text" name="userName" id="userName" autocomplete="on">
<input type="text"  name="paasword" id="password" autocomplete="on">

上述代码在 chrome 中运行良好,但在 firefox 和 ie 中无法运行。

注意 - 我正在使用 ajax 调用,当登录成功时我会使用 window.location.replace(redirect)

【问题讨论】:

    标签: java html internet-explorer firefox autofill


    【解决方案1】:

    试试这个方法

    <form action="" autocomplete="on">
      First name:<input type="text" name="fname"><br>
      Last name: <input type="text" name="lname"><br>
    
      <input type="submit">
    </form>
    

    我已经在 IE 和 mozilla 中测试过works

    IE 版本 10.0.92

    Mozilla firefox 32.0.1 版

    【讨论】:

    • 我不能将输入类型设置为“提交”,我正在使用 ajax 调用。还有更多我想在这里改变哪一部分?
    • @pappu_kutty 您在所有文本字段中使用 autocomplete="on" ,删除它们
    • 我做过,现在在 Firefox 中工作,但 ie 不工作
    • @pappu_kutty 对我来说它在 IE 和 firefox 中都可以工作
    猜你喜欢
    • 2011-04-06
    • 2017-11-20
    • 1970-01-01
    • 2018-07-10
    • 2018-12-22
    • 1970-01-01
    • 2018-07-19
    • 2014-12-23
    • 2013-06-29
    相关资源
    最近更新 更多