在被 frame 的网页<head>区是加入
<script language="Javascript"><!--
if ((window==top)||(top.location.href!=body))
top.location.href=='你的框架网页名URL'; //这个网页永远都会背着框架
// --></script>
<base target=body>另:强烈建议不要用body这样的关键词作为帧名。
<script language="Javascript"><!--
if ((window==top)||(top.location.href!=body))
top.location.href=='你的框架网页名URL'; //这个网页永远都会背着框架
// --></script>
<base target=body>另:强烈建议不要用body这样的关键词作为帧名。
if (window==top) //******************************
top.location.href=='你的框架网页名'; //这个网页永远都会拖着这个框架
// --></script>
<base target=body>另:强烈建议不要用body这样的关键词作为帧名。
<script language=javascript>
var str="";
try{
if(top.body.location.href==this.location.href) alert("It's in OK");
else alert("File not in body!");
}catch(e){
alert(e.description);
}
</script>
else alert("No");