Safari:自动填充功能可保存用户名,但应保存电子邮件

时间:2019-02-02 12:54:55

标签: html safari autofill

我遇到的问题是Safari将用户名保存到KeyChain,但应该保存电子邮件。

在注册页面中,我有三个输入:

<input
    type="text"
    name="username"
    autocomplete="off"
    required
>

<input
    type="email"
    name="e-mail"
    autocomplete="email"
    required
>
<input
    type="password"
    name="pass_word"
    autocomplete="new-password"
    required
>

但是,注册后,Safari钥匙串会保存用户名而不是电子邮件。我该如何强迫呢?

在我的登录页面中,我仅接受电子邮件地址作为“用户名”。

1 个答案:

答案 0 :(得分:0)

我在apple上找到了答案。

我必须将电子邮件设置为用户名,然后一切正常。

<input
    type="text"
    name="username"
    required
>

<input
    type="email"
    name="e-mail"
    autocomplete="username"
    required
>
<input
    type="password"
    name="pass_word"
    autocomplete="new-password"
    required
>