之前也是遇到这个问题,解决一个把简单的解决办法说一下,我之前的框架是这样的:
<%@ page language="java" pageEncoding="UTF-8"%>
<html>
<head>
<title>机械研究院</title>
</head>
<frameset cols="12%,76%,12%" framespacing=0 border=0 frameborder="0">
<frame rows="*" name="TopMenu" scrolling="no">
<frameset rows="130,*" id="resize" framespacing="0">
<frameset rows="78%,22%">
<frame name="menu" scrolling="no" src="${pageContext.request.contextPath}/adminhome_top.action">
<frame name="menu" scrolling="no" src="${pageContext.request.contextPath}/adminhome_top1.action">
</frameset>
<frameset cols="16%,84%">
<frame name="menu" scrolling="no" src="${pageContext.request.contextPath}/adminhome_left.action">
<frame name="right" scrolling="no" src="${pageContext.request.contextPath}/adminhome_right.action">
</frameset>
</frameset>
<frame rows="*" name="TopMenu" scrolling="no">
</frameset>
<noframes>
<body>
</body>
</noframes></html>
大家知道,这样整体的网页是不会一起移动的,解决办法就是在这个网页的外面在嵌套一个iframe框架,代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
<title>机械研究所-后台管理</title>
<!-- <script language="javascript"> function iFrameHeight(iframeID){ var ifm= document.getElementById(iframeID); var subIfm = ifm.contentWindow.document.documentElement.scrollHeight; if(ifm != null && subIfm != null){ ifm.height = subIfm; } } </script> -->
</head>
<body style="margin: 0px; width: auto;" onload="setHeight()">
<iframe id=foo src="${pageContext.request.contextPath}/adminhome_index.action" height="1000px;" width="100%" style="border-width:0px;" >
</iframe>
</body>
</html>
这个网页的src地址写前面一个页面的地址就可以解决了,至于struts2中的跳转就自己做吧