如何本窗体使用返回上一页的功能 貌似history对象记录的是当前窗口的所有history记录,也就是包括了当前窗口内的所有frame。所以会有这个问题。先挂着,研究下解决办法再来回帖。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 因为 history.back(); 相当于是点了一下IE的返回按钮,IE的返回按钮是"返回最后一次刷新的页面,无论是哪个窗体的"因为设置了a窗体5秒一次自动刷新,所以B窗体的返回按钮总是错误的返回了a窗体的内容.而不是b窗体自己本身的.我以为用比如 self.location.history.back(); 这样可以解决但是没有找到正确的方法. 不太明白你的意思和结构什么一会A一会a又一会B一会b的 <frameset cols="150,*"> <frame src="a.html"> <<<这是窗体A(或者a)<frame src="b.html"> <<<这是窗体B(或者b)</frameset> 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 <a href="javascript:history.go(-1)" target="_parent">GoBack</a> <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); 我实在不明白你的意思了!你一共就是3个页面主框架包含了left.asp和right.asp,一个在左边一个在右边,我点右边的怎么会返回左边呢?你的意思是点右边的返回时,right.asp占满整个窗口?我就不明白了都 我需要不动a窗体,仅返回b窗体的内容 我给的代码就是不会动a窗口,只会返回B窗口的代码 我举个例子: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] 你看看他返回你说的A也就是我这里面的left.asp 加<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秒一次自己在刷新.右边的框架中的 返回上一页均不好用(点开右边页面后,左边框架自动刷新了,点返回是返回左边框架的页面). 我的 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 /> 应该说你没看清我的贴!<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> 这个的范围怎么看啊,,越详细越好。。。 怎样为表格中的所有td一次性设置onMouseover事件 操作元素的特性? onsubmit事件的问题,蹊跷 关于两个select联动实现 最近的工作和支持多浏览器相关,感觉各个浏览器之间很多区别,这里调查一下各个浏览器的使用情况 如何控制层的显示与隐藏 如何让弹出的窗口总在最前面? 请教在js中使用浏览器的打印功能 关于位置 一个关于用JAVASCRIPT动态的生成一个新表格在IE中看不见的问题~~我是新手 jd内的广告连接在新窗口打开?
但是没有找到正确的方法.
<frame src="a.html"> <<<这是窗体A(或者a)
<frame src="b.html"> <<<这是窗体B(或者b)
</frameset>
<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
<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);
主框架包含了left.asp和right.asp,一个在左边一个在右边,我点右边的怎么会返回左边呢?
你的意思是点右边的返回时,right.asp占满整个窗口?我就不明白了都
我给的代码就是不会动a窗口,只会返回B窗口的代码
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]
<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秒一次自己在刷新.右边的框架中的 返回上一页均不好用(点开右边页面后,左边框架自动刷新了,点返回是返回左边框架的页面).
<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 />
<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>