貌似history对象记录的是当前窗口的所有history记录,也就是包括了当前窗口内的所有frame。所以会有这个问题。
先挂着,研究下解决办法再来回帖。

解决方案 »

  1.   

    因为 history.back(); 相当于是点了一下IE的返回按钮,IE的返回按钮是"返回最后一次刷新的页面,无论是哪个窗体的"因为设置了a窗体5秒一次自动刷新,所以B窗体的返回按钮总是错误的返回了a窗体的内容.而不是b窗体自己本身的.我以为用比如 self.location.history.back(); 这样可以解决
    但是没有找到正确的方法.
      

  2.   

    不太明白你的意思和结构什么一会A一会a又一会B一会b的
      

  3.   

    <frameset   cols="150,*"> 
    <frame   src="a.html">   <<<这是窗体A(或者a)
    <frame   src="b.html">   <<<这是窗体B(或者b)
    </frameset> 
      

  4.   

    html>
    <head>
    <title>全球华艺网--后台管理系统</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <script language="JavaScript">
    function trim(string)
    {
       var tmpchar, x, y, result;
       x = 0;
       tmpchar = string.charAt(x);
       while (tmpchar == ' ') {
          x ++;
          tmpchar = string.charAt(x);
       }
       y = string.length - 1;
       tmpchar = string.charAt(y);
       while (tmpchar == ' ') {
         y --;
          tmpchar = string.charAt (y);
       }
       if ( x <= y)
          result = string.substring(x,y+1);
       else
          result = "";
       return result;
    }
    </script>
    <frameset rows="15" cols="280,*" framespacing="false" frameborder="0" border="false"> 
      <frame name="left"  scrolling="auto" marginwidth="0" marginheight="0" src="left.asp">
      <frame name="right" scrolling="auto" src="right.asp">
    </frameset>
    <noframes>
    </noframes> 
    </html>这样的效果?在right.asp中加入<base target="_self">这个你返回的就是上一页不会刷新left.asp
      

  5.   

    <a href="javascript:history.go(-1)"  target="_parent">GoBack</a>
      

  6.   


    <frameset   cols="150,*"> 
    <frame name='a' id='a'  src="a.html"> 
    <frame name='b' id='b'  src="b.html"> 
    </frameset> parent.frame['a'].window.history.go(-1);
      

  7.   

    我实在不明白你的意思了!你一共就是3个页面
    主框架包含了left.asp和right.asp,一个在左边一个在右边,我点右边的怎么会返回左边呢?
    你的意思是点右边的返回时,right.asp占满整个窗口?我就不明白了都
      

  8.   

    我需要不动a窗体,仅返回b窗体的内容 
    我给的代码就是不会动a窗口,只会返回B窗口的代码
      

  9.   

    我举个例子:
    main.asp<html> 
    <head> 
    <title> 全球华艺网--后台管理系统 </title> 
    <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312"> 
    </head> 
    <script   language="JavaScript"> 
    function   trim(string) 

          var   tmpchar,   x,   y,   result; 
          x   =   0; 
          tmpchar   =   string.charAt(x); 
          while   (tmpchar   ==   '   ')   { 
                x   ++; 
                tmpchar   =   string.charAt(x); 
          } 
          y   =   string.length   -   1; 
          tmpchar   =   string.charAt(y); 
          while   (tmpchar   ==   '   ')   { 
              y   --; 
                tmpchar   =   string.charAt   (y); 
          } 
          if   (   x   <=   y) 
                result   =   string.substring(x,y+1); 
          else 
                result   =   ""; 
          return   result; 

    </script> 
    <frameset   rows="15"   cols="280,*"   framespacing="false"   frameborder="0"   border="false">   
        <frame   name="left"     scrolling="auto"   marginwidth="0"   marginheight="0"   src="left.asp"> 
        <frame   name="right"   scrolling="auto"   src="right.asp"> 
    </frameset> 
    <noframes> 
    </noframes>   
    </html> 
    left.asp代码如下:
    [code=HTML]<a href="a.htm" target="right">a</a><br /><a href="b.htm" target="right">b</a><br />right.asp代码如下:
    <base   target="_self"> 
    <a href="c.asp" target="right">c</a>
    c.asp代码如下:
    <base   target="_self"> 
    <INPUT   TYPE="button"   value="返回"   onclick="history.back();"> 
    你看看他回发A吗?
    [/code]
      

  10.   

    你看看他返回你说的A也就是我这里面的left.asp
      

  11.   


    <base   target="_self"> 

    <INPUT TYPE="button" value="返回" onclick="parent.frame['feedbacklist'].window.history.go(-1);">
    <INPUT TYPE="button" value="返回" onclick="parent.feedbacklist.window.history.go(-1);">均无法实现效果请各位读贴后再回答在左边那个框架是有自动刷新的,这才是问题的关键自动刷新
    <meta   http-equiv="Refresh"   content="5;URL=a.html"> 或者你的是
    <meta   http-equiv="Refresh"   content="5;URL=left.asp> 总之,问题的关键是,左边的框架5秒一次自己在刷新.右边的框架中的 返回上一页均不好用(点开右边页面后,左边框架自动刷新了,点返回是返回左边框架的页面).
      

  12.   

    我的 left.asp代码改如下:其他的代码还是之前写的!
    <meta  http-equiv="Refresh"  content="5;URL=left.asp">
    <base   target="_self"> 
    <a href="a.htm" target="right">a</a><br /><a href="c.asp" target="right">b</a><br />
      

  13.   

    应该说你没看清我的贴!<html> 
    <head> 
    <title> 全球华艺网--后台管理系统 </title> 
    <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312"> 
    </head> 
    <script   language="JavaScript"> 
    function   trim(string) 

          var   tmpchar,   x,   y,   result; 
          x   =   0; 
          tmpchar   =   string.charAt(x); 
          while   (tmpchar   ==   '   ')   { 
                x   ++; 
                tmpchar   =   string.charAt(x); 
          } 
          y   =   string.length   -   1; 
          tmpchar   =   string.charAt(y); 
          while   (tmpchar   ==   '   ')   { 
              y   --; 
                tmpchar   =   string.charAt   (y); 
          } 
          if   (   x   <=   y) 
                result   =   string.substring(x,y+1); 
          else 
                result   =   ""; 
          return   result; 

    </script> 
    <frameset   rows="15"   cols="280,*"   framespacing="false"   frameborder="0"   border="false">   
        <frame   name="left"     scrolling="auto"   marginwidth="0"   marginheight="0"   src="left.asp"> 
        <frame   name="right"   scrolling="auto"   src="right.asp"> 
    </frameset> 
    <noframes> 
    </noframes>   
    </html> 
    <frameset   rows="15"   cols="280,*"   framespacing="false"   frameborder="0"   border="false">   
        <frame   name="left"     scrolling="auto"   marginwidth="0"   marginheight="0"   src="left.asp"> 
        <frame   name="right"   scrolling="auto"   src="right.asp"> 
    </frameset> 
    <noframes> 
    </noframes>