• 周一. 1 月 13th, 2025

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

防止网页被嵌入框架的代码

admin

11 月 28, 2021
    try{

      top.location.hostname;

      if (top.location.hostname != window.location.hostname) {

        top.location.href =window.location.href;

      }

    }

    catch(e){

      top.location.href = window.location.href;

    }

文章转载:https://www.ruanyifeng.com/blog/2010/08/anti-frameset_javascript_codes_continued.html

如果这篇文章对您有帮助,您可以打赏我

技术交流QQ群:15129679

发表回复