我记得好象就用document.clear();
怎么会不行呢?

解决方案 »

  1.   

    可是真的不行!你试试在一个frame中清楚另外一个frame中的内容,写可以,但是这种方法行不通!怪!
      

  2.   

    /////////////fr.htm
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><frameset cols="80,*" frameborder="NO" border="0" framespacing="0"> 
      <frame name="leftFrame" scrolling="NO" noresize src="left.htm">
      <frame name="mainFrame" src="right.htm">
    </frameset>
    <noframes><body bgcolor="#FFFFFF" text="#000000"></body></noframes>
    </html>/////////left.htm
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language=javascript>
    function clearright()
    {
    kkk= window.parent.frames["mainFrame"].document
    kkk.open()
    kkk.clear()
    kkk.close()

    </script>
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <a href='javascript:clearright()'>jsf</a>
    </body>
    </html>
    ////////right.htm
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body bgcolor="#FFFFFF" text="#000000">
    wrewrwerwerew
    </body>
    </html>
    /////////////////////////调试通过(ie5)