Re: [問題] 導覽列連結視窗的問題

看板Web_Design作者 (風御影)時間19年前 (2006/11/03 00:30), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《qqcsj (開始想念Doener)》之銘言: : 最近在學css : 我用css做了一個三欄的版型 : 左邊是導覽列 : 中間是我網頁想呈現的框框 : 請問我要怎麼弄 : 才能讓導覽列按下去後的內容出現在中間那欄? 我最近寫的網頁也是像這樣子,不過我導覽列的連結還是連到另外一個網頁去 就是跟原來的頁面有一樣的導覽列的頁面 我的作法是用PHP Smarty樣板引擎去做 就是引入子樣板 a.html ---------------------------------------------------------------------------- <{include file=$top_page}> <div id="content"> ........... </div> <{include file=$right_page}> ----------------------------------------------------------------------------- b.html --------------------------------------------------------------------------- <html xmlns="" rel="nofollow">http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="header"> <span class="strapline">這是top_page</span> </div> </body> </html> --------------------------------------------------------------------------- c.html ---------------------------------------------------------------------------- <html xmlns="" rel="nofollow">http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>無標題文件</title> <link rel="stylesheet" type="text/css" href="CSS/adminData.css" /> </head> <body> <div id="nav"> <ul> <li><a href="....">這是導覽列</a></li> </ul> </div> </body> </html> ----------------------------------------------------------------------------- a.php ----------------------------------------------------------------------------- <?php include ('includes/main_new.php'); require ('includes/loginCheck.php'); $tpl = new Template(); $tpl -> assign("top_page", "b.html"); $tpl -> assign("right_page", "c.html"); $tpl -> display('a.html'); ?> ----------------------------------------------------------------------------- 那連到其他網頁的時候只要在其他網頁的html部份跟a.html一樣 <{include file=$top_page}>//重點 <div id="content"> //其他網頁的內容打在這裡 </div> <{include file=$right_page}>//重點 理論上用 include 也是可以啦 不過個人偏好用樣板引擎 樣板引擎的資料是從旗標出版的"PHP Smarty 樣板引擎"上面學來的 有需要的話可以去參考一下 網路找應該也可以找到很多 如果有哪裡看不懂...我會盡量說明 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.13.100.210

11/03 00:52, , 1F
謝謝~~ 我晚點再來試試
11/03 00:52, 1F

11/03 00:53, , 2F
有問題再來請教^^
11/03 00:53, 2F
文章代碼(AID): #15IXqaAV (Web_Design)
文章代碼(AID): #15IXqaAV (Web_Design)