隻允許,同一域名下IFRAME,禁止直接訪問頁麵
/*
*隻允許,同一域名下IFRAME
*凨來了
*/
var url='指定的iframe頁麵';
if ((parent.window.location.host != window.location.host) && (top.window.location.href != window.location.href)) {
top.window.location.href = url;
}else if(top==self){
<span > </span>top.window.location.href = url;
}
最後更新:2017-04-03 07:56:55