框架frameset和frame实现左右导航

main.jsphtml

设计为上面是top.jsp浏览器

左边为left.jsp,右边为要变化显示部分,起名为main框架

每次要变化上面就要加上target="main"jsp


<!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>
</head>
<frameset rows="42,*"  frameborder="NO" border="0" framespacing="0">
    <frame src="top.jsp" noresize="noresize" frameborder="NO" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" />
  <frameset cols="200,*"   id="frame">
    <frame src="left.jsp" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" target="main" />
                                      
                                      
    <frame src="user.jsp" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="_self" />
  </frameset>
<noframes>
  <body>很抱歉,馈下使用的浏览器不支援框架功能,请转用新的浏览器</body>
    </noframes>
</html>


left.jsp中<a></a>也要加上target="main"ide

<li><a href="index.jsp" target="main">Home</a></li>
相关文章
相关标签/搜索