【问题标题】:Browser autofill issue in safariSafari中的浏览器自动填充问题
【发布时间】:2017-03-02 07:31:54
【问题描述】:

我正在设计付款表单。我需要将credit card number 及其expiry date 字段作为自动填充。 Chrome 浏览器完美运行,而 Safari 却不行 (Safari doesn't recognize the expiry_date field to be autofill)。

这是我的两个字段。

<input type="text" id="card_number" />
<input type="text" id="expiry_date" placeholder="MM / YY" />

分离month and year of the expiry date 可能会有解决方案,但我现在应该这样做。

【问题讨论】:

    标签: html safari autofill


    【解决方案1】:

    https://cloudfour.com/thinks/autofill-what-web-devs-should-know-but-dont/

    查看Autofill detail tokens

    可以指定表单字段以考虑自动填写信用卡到期日期in two ways

    • cc-exp,表示 YYYY-MM 格式的日期,或
    • cc-exp-yearcc-exp-month 分别用于保存 YYYY 和 MM 的各个字段。

    【讨论】:

      猜你喜欢
      • 2013-04-04
      • 2018-12-04
      • 2012-04-17
      • 2014-03-03
      • 2012-07-27
      • 2012-03-03
      相关资源
      最近更新 更多