托管付款字段如何更改父级课程



最近,我正在托管付款字段https://www.braintreepayments.com/blog/your-checkout-iframes/。当我输入错误时,容器Div的类别被更改,这是如何工作的?我认为没有办法打电话给父母不同?

输入不良的代码。

    <div class="form-control braintree-hosted-fields-invalid" id="hosted-fields-number">
        <iframe src="https://assets.braintreegateway.com/hosted-fields/2.15.5/hosted-fields-frame.html#5c7db060-9271-4eac-b4a2-0f405d743293" frameborder="0" allowtransparency="true" scrolling="no" type="number" name="braintree-hosted-field-number" id="braintree-hosted-field-number" style="border: none; width: 100%; height: 100%; float: left;">
        </iframe>
    <div style="clear: both;">

它们大概是使用Web消息传递,该消息是专门设计用于提供交叉通信的。因此,他们在父页面上运行的脚本会在iframe中聆听其脚本的消息,并通过更新字段上的类来响应这些消息。

最新更新