以上三欄頁框要謝謝同學全棋的告知!
若點選「左頁框」連結,「右頁框」頁面將改變,點選「右頁框」連結後,「上頁框」也會改變,以下則是HTML程式碼。
(1) 首先,我們要有一個首頁,也就是要用來分割三個頁面的(或是定義此三個頁面要如何分割) - index.html
<html> <!- 分割上下頁框比為1比9 --> </html> |
(2) 左頁框內容 - left.html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>left</title> </head> <body> <li>Left</li> <!- 指定right_container1.html連結給右頁框 --> <li><a href="right_container1.html" target="right">Container 1</a></li> <!- 指定right_container2.html連結給右頁框 --> <li><a href="right_container2.html" target="right">Container 2</a></li> </body> </html> |
(3) 右頁框內容 - right.html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>right</title> </head> <body> <li>Right</li> </body> </html> |
(4) 上頁框內容 - top.html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>top</title> </head> <body> <center>Top</center> </body> </html> |
(5) 左頁框之連結一內容 - right_container1.html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Right Container 1</title> </head> <body> <li><font color="red">Right Container 1</font></li> <!- 指定top_container1.html連結給上頁框 --> <li><a href="top_container1.html" target="top">Top Container 1</a></li> <!- 指定top_container2.html連結給上頁框 --> <li><a href="top_container2.html" target="top">Top Container 2</a></li> </body> </html> |
(6) 左頁框之連結二內容 - right_container2.html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Right Container 2</title> </head> <body> <li><font color="blue">Right Container 2</font></li> <!- 指定top_container1.html連結給上頁框 --> <li><a href="top_container1.html" target="top">Top Container 1</a></li> <!- 指定top_container2.html連結給上頁框 --> <li><a href="top_container2.html" target="top">Top Container 2</a></li> </body> </html> |
(7) 右頁框之連結一內容 - top_container1.html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Top Container 1</title> </head> <body> <center><font color="red">Top Container 1</font></center> </body> </html> |
(8) 右頁框之連結二內容 - top_container2.html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Top Container 2</title> </head> <body> <center><font color="blue">Top Container 2</font></center> </body> </html> |
以上的教學若有錯誤,也請告位告知或糾正,謝謝~~^^!!
留言列表