Back button in an iframe (widget for an iGoogle-like portal)

前端 未结 2 462
暖寄归人
暖寄归人 2021-01-21 12:50

I\'m trying to create a widget (which is basically an iframe) that would have its own back and forward buttons. That is, when I hit the widget back-button, only the iframe goes

相关标签:
2条回答
  • 2021-01-21 13:29

    Since your widget and the page are hosted under different domains for sequre reasons you won't get access from iframe to the parent page by scripts.

    0 讨论(0)
  • 2021-01-21 13:38

    Try this:

    <a class="button" href="#" onclick="parent.history.back();return false;">
    
    0 讨论(0)
提交回复
热议问题