合作联系微信: w6668263      合作联系电话:177-9238-7426     

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

    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

posted on 2021-07-12 09:52  草率的龙果果  阅读(55)  评论(0)    收藏  举报

导航