frameset中一个frame中的按钮怎么刷新另外两个frame中的页面?
<frameset cols="25%,75%" id="fs">
<frameset rows="35%,70%">
<frame src="./jsp/condition.jsp" name="condition" noresize="noresize">
<frame src="./jsp/tree.jsp" name="tree">
</frameset>
<frame src="./jsp/detail.jsp" name="detail">
</frameset>
大概的frame结构就是上面那样,在condition.jsp中有个button,点击以后,回去后台数据库取数据,怎么样才能同时把检索出来的数据反映到tree.jsp跟detail.jsp中呢?我这边的大体框架是用struts搭的。。多谢看贴回帖的兄弟们哈
[解决办法]
tree.jsp跟detail.jsp
window.onload = function() {
//ajax.....
}
button.onclick = function() {
tree.location = "tree.jsp";
detail.location = "detail.jsp";
}
大概就是这个样子了。
[解决办法]
button.onclick = function() {
tree.location = "tree.jsp";
detail.location = "detail.jsp";
}
改成
button.onclick = function() {
tree.location = "tree.action";
detail.location = "detail.action";
}
[解决办法]
window.parent.frames["tree"].location.reload();看看能不能用吧 这个只能刷新页面 你也可以window.parent.frames["tree"].定义的方法名比如refreshPage(参数);你看看能用吗。
[解决办法]
<script type="text/javascript">
var menuContentLeft = 你的frame的name属性;
parent.menuContentLeft.location.reload();
</script>
在每个JSP里加上这个,试试吧。。。。
[解决办法]