How to set the response of a form post action to a

2019-07-18 02:17发布

I have a form and an iframe. I want to set the source of the iframe on form submit to a 3rd party payment gateway url. Also, onSubmit a javascript function is called. I want to display the response of the form submit within a iframe rather than in the parent window. Kindly guide me. Thanks.

1条回答
男人必须洒脱
2楼-- · 2019-07-18 02:43
<form target="frame" onsubmit="document.getElementById('frame').style.display = 'block';">
</form>

<iframe id="frame" name="frame" style="display: none;"></iframe>

I think that's all you need ;)

查看更多
登录 后发表回答