我正在实现您的平均SSL安全支付表,我已经能够让Chrome一直自动填充存储的信用卡条目从一个登录的谷歌帐户。然而,我一直未能找到神奇的一系列比特和配置,以迫使它促使我保存新的信用卡条目。
让我们拿出一组被剥离的支付字段:
<form action="/someroute" method="post" id="pmntForm" autocomplete="on">
<h2>Auto Fill Test</h2>
<label for="nameoncard">Name on Card</label>
<input type="text" id="nameoncard" name="nameoncard" autocomplete="cc-name">
<label for="ccnumber">Credit Card Number</label>
<input type="text" id="ccnumber" name="ccnumber" autocomplete="cc-number" />
<label for="cc-exp-month">Expiration Month</label>
<input type="number" id="cc-exp-month" name="cc-exp-month" autocomplete="cc-exp-month">
<label for="cc-exp-year">Expiration Year</label>
<input type="number" id="cc-exp-year" name="cc-exp-year" autocomplete="cc-exp-year">
<label for="cvv">CVV</label>
<input type="text" id="cvv" name="cvv" autocomplete="cc-csc">
<input type="submit" value="Submit" name="submit">
</form>
这正是我想要的自动填充我的Chrome帐户中现有卡的功能:
然而,如果我输入了一组完整的新支付数据;我希望用户单击submit - Chrome时,应该提示将数据保存为新的信用卡条目(具有讽刺意味的是,这张图片来自某个想要禁用它的人的帖子):
发布于 2016-07-28 20:06:36
这是反应中的一个小把戏,但它应该能回答你的问题。
<form name="ccform" action="">
<input name="cc-number" placeholder="Card Number" autocomplete="cc-number" />
<input name="cc-csc" placeholder="Security Code (CVC)" autocomplete="cc-csc" />
<input name="cc-exp-month" placeholder="MM" autocomplete="cc-exp-month" />
<input name="cc-exp-year" placeholder="YYYY" autocomplete="cc-exp-year" />
</form>
资源:
您还可以使用chrome工具签出具有自动完成表单的其他网站,如下所示:
不是完美的答案,但希望它有帮助!当我找到完全正确的解决方案时,我会更新。:)
https://stackoverflow.com/questions/38024298
复制相似问题