a.jsp<html>
<head></head>
<body>
<iframe id = "queryData" src = "b.jsp">
<iframe id = "queryList" src = "c.jsp>"
</body>
</html>b.jsp :
queryListAction 是搜索数据库并forward 到queryList<html>
<head></head>
<body>
<form action="queryList.do" method="post">
</body>
</html>struts-config.xml:
QueryData是actionForm<action name="QueryDataActionForm" path="customerQueryList" scope="request" type="QueryListAction" validate="false">
<forward name="success" path="/projectpre/customer/infoquery/QueryList.jsp" />
</action>如何实现,数据从b.jsp提交到action,最后在c.jsp的位置显示,而b.jsp不变
<head></head>
<body>
<iframe id = "queryData" src = "b.jsp">
<iframe id = "queryList" src = "c.jsp>"
</body>
</html>b.jsp :
queryListAction 是搜索数据库并forward 到queryList<html>
<head></head>
<body>
<form action="queryList.do" method="post">
</body>
</html>struts-config.xml:
QueryData是actionForm<action name="QueryDataActionForm" path="customerQueryList" scope="request" type="QueryListAction" validate="false">
<forward name="success" path="/projectpre/customer/infoquery/QueryList.jsp" />
</action>如何实现,数据从b.jsp提交到action,最后在c.jsp的位置显示,而b.jsp不变
解决方案 »
- 火狐浏览器不能显示绝对路径图片
- 在eclipse中,tomcat发布多个项目如何操作? 100分
- SSH中文乱码问题
- java 导出excel
- 控件的名字不能以数字开头,是么?
- 问一个JSP与MYSQL的小问题,请大家看看帮帮忙!!!
- HibernateDaoSupport获取不到sessionFactory问题
- 请教登陆的问题,如何防止没有登陆过的用户访问深层次的页面?用session来控制?
- 请教各位高手,如何在javabean里面使用response.sendRedirect(),为什么我总是编译无法通过?(附代码)
- Java Axis2 的 RPC 方式调用 webservice 接口 传递对象参数 服务器端接收参数值为NULL
- 急!! 谁用过JasperReport? 现在需要输出报表导html, 但字段需要动态定义,请问怎么实现啊?
- 利用jasperreport+jfreechart如何实现图形报表与数据报表的同时显示?
设b.jsp form的id = bFrm,提交的时候,调用下面的js:
funcation onClick() {
bFrm.target = "queryListFrm";
bFrm.submit();
}
这样做,数据会提交到action 处理;b.jsp也会保持不变;
但是显示的部分不知道怎么做?
相应地方改为
<iframe name = "queryData" src = "b.jsp">
<iframe name = "queryList" src = "c.jsp">
<form action="queryList.do" method="post" target="queryList">
</form>
相应地方改为
<iframe name = "queryData" src = "b.jsp">
<iframe name = "queryList" src = "c.jsp">
<form action="queryList.do" method="post" target="queryList">
</form>
我改成下面的样子试了一把,也不行
<form action ="queryList.do" method = "post" target = "parent.queryList">
</form>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
</head><body>
<iframe name="top" src="1.html"></iframe>
<iframe name="main" src="2.html"></iframe>
</body>
</html>1.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
</head><body>
1111111111111
<form action="3.html" target="main">
<input type="submit" value="submit">
</form>
</body>
</html>2.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
</head><body>
222222222222222222222
</body>
</html>3.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
</head><body>
333333333333333333333333333
</body>
</html>
试验成功!!!!!!!!!!!!!!!!!!!