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;
}
防止网页被嵌入框架的代码
原文地址:http://www.cnblogs.com/zhoudawei/p/7514077.html
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;
}
防止网页被嵌入框架的代码
原文地址:http://www.cnblogs.com/zhoudawei/p/7514077.html