iframe问题 一个页面有头部左部右部 分别是iframe嵌套的页面 我想实现点击左部iframe里面的链接 左侧不刷新 右侧出现相应内容 在线等待 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <%-- Document : admin_index Created on : 2010-9-9, 9:34:56 Author : Administrator--%><%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><html xmlns="http://www.w3.org/1999/xhtml"> <head><title>管理中心</title> <script> if(self!=top){ top.location=self.location; } </script><meta http-equiv="Content-Type" content="text/html;charset=utf-8"></head><frameset rows="59,*" frameborder="no" border="0" framespacing="0"> <frame src="top.jsp" noresize="noresize" frameborder="0" name="topFrame" marginwidth="0" marginheight="0" scrolling="no"><frameset rows="*" cols="195,*" id="frame"> <frame src="left.html" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto"> <frame src="ManageUser.jsp" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes"></frameset><frame src="UntitledFrame-1" noresize="noresize" frameborder="0" name="bottomFrame" marginwidth="0" marginheight="0" scrolling="no"><noframes> <body></body></noframes></frameset></html> <table><tr><td><iframe width = "100px" height = "300px" src = "demo6.html"></iframe></td><td><iframe width = "300px" height = "300px" name = "main" src = ""></iframe></td></tr></table>demo6.html:<a onclick = "parent.main.location.href='http://www.qq.com'">111</a> 楼主你要的是这个吧 用ajax实现,左边不动,右边起个名字 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="cache-control" content="no-cache,must-revalidate" /><meta http-equiv="pragma" content="no-cache" /> <frameset rows="64,*" cols="*" frameborder="no" noresize="noresize" border="0" framespacing="2"> <frame src="top.jsp" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="topFrame" /> <frameset rows="*" cols="139,*" framespacing="2" frameborder="no" border="0"> <frame src="left.jsp" name="leftFrame" scrolling="no" noresize="noresize" id="leftFrame" title="leftFrame" /> <frame src="test.do" name="rightFrame" scrolling="auto" id="rightFrame" title="rightFrame" /> </frameset></frameset><noframes><body></body></noframes></html> left.jsp<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="cache-control" content="no-cache,must-revalidate" /><meta http-equiv="pragma" content="no-cache" /><style type="text/css"><!--.STYLE1 {font-size: 18px}body { background-color: #3D99F5;}--></style></head><body> <p align="center" class="STYLE1"><a href="../admin/search.do" target="rightFrame">信息查询</a></p> <p align="center" class="STYLE1"><a href="../user/user.do" target="rightFrame">用户管理</a></p> <p align="center" class="STYLE1"><a href="../admin/systemconfig.do" target="rightFrame">系统配置</a></p> <p align="center" class="STYLE1"><a href="editpwd.jsp" target="rightFrame">修改密码</a></p></body></html> 右边框架带个name左边的连接内加入 <a href="xxx" target="reight">右边变化</a> <a href="xxx" target="right">右边变化</a> 把左边的链接的名字 赋给到右边的iframe的src里 很简单,给右侧的iframe起个名字,比如name="right",然后再左侧<a href="#" target="right"></a>,就ok了,主要是target的问题,target默认值是_parent 花生壳怎么设置路由器 struts2简单问题 hibernate远程连接sql-server,怎么设置啊? 想做个BS架构的程序 我晕!我发的招聘帖子怎么被删除了! sql 得不到正确结果 编译JavaBean的时候的问题 我这么用对吗?关于数据转换 (强烈推荐)下载设计模式迷你帮助手册 今天非常不爽,散分 javamail 如果我要实现这些功能,我需要学习哪些知识?克服哪些难点?
<%--
Document : admin_index
Created on : 2010-9-9, 9:34:56
Author : Administrator
--%><%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>管理中心</title>
<script>
if(self!=top){
top.location=self.location;
}
</script>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"></head>
<frameset rows="59,*" frameborder="no" border="0" framespacing="0">
<frame src="top.jsp" noresize="noresize" frameborder="0" name="topFrame" marginwidth="0" marginheight="0" scrolling="no">
<frameset rows="*" cols="195,*" id="frame">
<frame src="left.html" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto">
<frame src="ManageUser.jsp" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes">
</frameset>
<frame src="UntitledFrame-1" noresize="noresize" frameborder="0" name="bottomFrame" marginwidth="0" marginheight="0" scrolling="no">
<noframes>
<body></body>
</noframes>
</frameset>
</html>
<table>
<tr>
<td>
<iframe width = "100px" height = "300px" src = "demo6.html">
</iframe>
</td>
<td>
<iframe width = "300px" height = "300px" name = "main" src = "">
</iframe>
</td>
</tr>
</table>
demo6.html:<a onclick = "parent.main.location.href='http://www.qq.com'">111</a>
楼主你要的是这个吧
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache,must-revalidate" />
<meta http-equiv="pragma" content="no-cache" />
<frameset rows="64,*" cols="*" frameborder="no" noresize="noresize" border="0" framespacing="2">
<frame src="top.jsp" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="topFrame" />
<frameset rows="*" cols="139,*" framespacing="2" frameborder="no" border="0">
<frame src="left.jsp" name="leftFrame" scrolling="no" noresize="noresize" id="leftFrame" title="leftFrame" />
<frame src="test.do" name="rightFrame" scrolling="auto" id="rightFrame" title="rightFrame" />
</frameset>
</frameset>
<noframes><body>
</body>
</noframes>
</html>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache,must-revalidate" />
<meta http-equiv="pragma" content="no-cache" />
<style type="text/css">
<!--
.STYLE1 {font-size: 18px}
body {
background-color: #3D99F5;
}
-->
</style>
</head><body>
<p align="center" class="STYLE1"><a href="../admin/search.do" target="rightFrame">信息查询</a></p>
<p align="center" class="STYLE1"><a href="../user/user.do" target="rightFrame">用户管理</a></p>
<p align="center" class="STYLE1"><a href="../admin/systemconfig.do" target="rightFrame">系统配置</a></p>
<p align="center" class="STYLE1"><a href="editpwd.jsp" target="rightFrame">修改密码</a></p>
</body>
</html>
左边的连接内加入 <a href="xxx" target="reight">右边变化</a>