say your 框架页 is "frame.html", the two frames are a.html and b.html, add this code inside your a.html and b.html:<script language="javascript"> var bLoadTop = true; if (top != self) { if (top.location.href.indexOf("/frame.html") >0) bLoadTop = false; } if (bLoadTop) top.location.href="frame.html"; </script>
{
if (top.location.href.indexOf("/frame.html") >0)
bLoadTop = false;
} if (bLoadTop)
top.location.href="frame.html";
</script>
同时也谢谢 sdtashenjie(sdtashenjie)