将以下代码写到只希望在框架中被浏览的页面中去。
if( window.top == window )
{
 location.href = "框架页面地址";
}