用frameset后网页间请求数据的传递

来源:互联网 发布:js mousewheel事件 编辑:程序博客网 时间:2024/06/04 22:33

           用frameset整合页面

<frameset rows="80px,420px" cols="*" framespacing="0" frameborder="no"
border="0"  >
<frame
src="<%=request.getContextPath()%>/helpcenter/rightHelpTop.do"
name="rightHelpTop" frameborder="0" scrolling="no" 
marginwidth="0" marginheight="0" target="helpCentent" >
<frame
src="<%=request.getContextPath()%>/helpcenter/rightHelpBottom.do"
name="helpCentent" frameborder="0" scrolling="no"  marginwidth="0" 
marginheight="0" target="helpCentent" >
</frameset>

            如果要在某一个页面触发了事件,要将事件传给后台,事件处理后将结果在另外一个frame框架中显示,可以在当前页使用如下方法:

                              window.parent.frames['helpCentent'].location.href = "helpcenter/helpSearchContent.do?searchId=" + temp;

                   其中“helpCentent”为frame框架的name属性。在后台action中将处理后跳转到目标页面即可。

0 0