frame1.htm 或frame2.htm 里加上这么一句:<script language="JavaScript"><!--
  if (window == top)top.location.href = "main.htm";
// --></script>最后我声明,我是低手。

解决方案 »

  1.   

    在frame1.htm和frame2.htm的<head>里分别写上
    <script>
    if(parent.frames.length!=2)
    parent.location="main.htm";
    </script>
      

  2.   

    显然楼主是一个超级高手,不过建议下次发贴提问之前先翻翻基本的Javascript的参考书,免得把我们这般菜鸟吓坏了
      

  3.   

    同楼上所说的,在frame1.htm和frame2.htm的<head>里分别写上
    <script language="javascript">
    function init()
    {
    if(parent.frames.length!=2)
    parent.location="main.htm";
    }
    </script><body onload="init()">
      

  4.   

    <script language="JavaScript">
    <!--
      if (!/main\.htm$/.test(top.location.href))top.location.href="main.htm";
    // -->
    </script>
      

  5.   

    if(top.frameElement==null){
        top.location.href = "main.htm";
    }

    if(parent.location.href!="main.htm"){
    parent.location.href="mai.htm"
    }
      

  6.   

    干脆像www.rongshu.com的首页一样,(不过是)模拟一个地址输入栏,也不错
      

  7.   

    对不起,我说错了,是“简单问题,高手别进哟!”
    愿意是,在main.htm文件中有一个input,type=hidden, name=dd,
    我必须测试此对象的取值,但我怎样在frame2.htm测试它呢?
      

  8.   

    更晕!
    main.htm 里有了 frame,居然还能再有 form 和 input?
    超级混合页面,呵呵