submitting the form in iframe and redirect the whole page

后端 未结 2 1480
情话喂你
情话喂你 2020-12-14 06:57

i guess I have an easy question, I have not found the right answer yet thoguh. I have an iframe in my page that comes from external domain. After submiting the form which is

相关标签:
2条回答
  • 2020-12-14 07:44

    I have put target='_parent' in the iframe but I haven't done this initially in the form element. After adding target='_parent' attribute to form it started to work as expected.

    0 讨论(0)
  • 2020-12-14 07:56

    Add a target attribute to the form within the iframe:

    <form action="foobar" method="post" target="_parent">
      ...
    </form>
    
    0 讨论(0)
提交回复
热议问题