parent.mainFrame.parent=parent,你兜这么一圈干什么?

解决方案 »

  1.   

    parent.mainFrame.parent.history.length一定是等于0了
      

  2.   

    试验了一下,<html>
    <frameset cols="50%,*">
    <frame src="http://www.google.com"></frame>
    <frame src="about:<button onclick='history.go(-1)'>test1<button onclick='parent.history.go(-1)'>test2<button onclick='parent.frames[0].window.history.go(-1)'>test3"></frame>
    </frameset>
    </html>test3按钮事件中对其他的框架的history是有拒绝访问的问题,反正history都是一样的,何必非要访问指定框架的history呢?直接在当前框架下面(test1按钮)或者在父框架上面(test2按钮)访问history不就行了?
      

  3.   

    呵呵.... 框架之间的 history 是拒绝访问的. (嘿嘿.. 不过你可以在当前页做一个 button , 里面加入
    history.back() . 然后在其他页面调用的时候.. buttonName.Click() 不就得了?)(这个框架限制可真多....晕!)
      

  4.   

    如果HISTORY.LENGTH为0的话是不是就不行了?