【发布时间】:2019-03-18 04:12:26
【问题描述】:
我正在尝试使用 Stripe Elements (https://stripe.com/docs/stripe-js/reference#other-methods) 添加信用卡表单。
通常我会专注于一个元素:
$('input[type="tel"]').focus()
但是,这不适用于 Stripe 信用卡输入。但是,以下方法确实有效:
$('input[type="tel"]').value='asdf'
所以它正在抓取正确的项目。如何将光标聚焦在输入项上?看起来它可能在 iframe 中,即使我可以在 jquery/javascript 中为其写入值。
【问题讨论】:
-
可能模拟点击?
-
@JBDouble05 似乎它可能在 iframe 中?另外,如何模拟点击?
标签: javascript jquery stripe-payments