一个页面有头部左部右部  分别是iframe嵌套的页面 我想实现
点击左部iframe里面的链接 左侧不刷新  右侧出现相应内容  在线等待

解决方案 »

  1.   


    <%-- 
        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>
      

  2.   


    <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> 
    楼主你要的是这个吧
      

  3.   

    用ajax实现,左边不动,右边起个名字
      

  4.   


    <%@ 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>
      

  5.   

    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>
      

  6.   

    右边框架带个name
    左边的连接内加入 <a href="xxx" target="reight">右边变化</a>
      

  7.   

    <a href="xxx" target="right">右边变化</a>
      

  8.   

    把左边的链接的名字  赋给到右边的iframe的src里
      

  9.   

    很简单,给右侧的iframe起个名字,比如name="right",然后再左侧<a href="#" target="right"></a>,就ok了,主要是target的问题,target默认值是_parent