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>