防止网页被嵌套

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;

}

posted @ 2017-07-01 18:22  落灯花  阅读(193)  评论(0编辑  收藏  举报