top.frame2.document.all.div1.display = 'none';frame2是另一个页面的name
div1是页面层的ID

解决方案 »

  1.   

    top.frame2.document 获得的是top的document
    应该这样
    top.frames(top.frame2.uniqueID).document
      

  2.   

    t.htm<frameset cols="92,*">
      <frame src="left.htm" name="topFrame" scrolling="NO" >
      <frame src="main.htm" name="mainFrame">
    </frameset>left.htm<input type=button onclick="parent.mainFrame.bao.style.display='block'">main.htm<div style="display:none" id=bao>灰豆宝宝.net</div>