douji7399
2012-11-04 23:09
浏览 240

如何防止iframe中的网站刷新整个网站? [关闭]

I have a simple iframe in my website that displays other websites. Users submit their websites and then other users can view that website in an iframe within my website. It works great, but the problem is that there are certain sites that refresh the whole site and the user ends up leaving my site and visits the site in the iframe. How would I prevent this from happening? I don't mind if a user clicks a link and they leave my website, but I don't want them initially leaving my website. Thank you very much.

图片转代码服务由CSDN问答提供 功能建议

我的网站上有一个显示其他网站的简单iframe。 用户提交他们的网站,然后其他用户可以在我的网站的iframe中查看该网站。 它工作得很好,但问题是某些网站刷新整个网站,用户最终离开我的网站并访问iframe中的网站。 我该如何防止这种情况发生? 我不介意用户点击链接并离开我的网站,但我不希望他们最初离开我的网站。 非常感谢你。

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dtwbp26022 2012-11-04 23:54
    已采纳

    But if you dont want them to leave you can always open that link in another window using the target option.

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题