我試圖創建一個頁面元素的錨點。有一個標籤界面。在HTML中我可以看到,他們的聯繫是這樣的:錨定到CodeIgniter部分
http://example.com/index.php/service#tab-1
http://example.com/index.php/service#tab-2
http://example.com/index.php/service#tab-3
http://example.com/index.php/service#tab-4
所以,我有4條格與ID的標籤-1,標籤-2等
如何從另一個視圖中創建錨他們文件?當我嘗試這個:
<a href="<?=site_url();?>/service#tab-1">give it a try</a>
它轉到頁面/服務,但沒有專注於#tab-1。它正在處理純html,但我無法用codeigniter做到這一點
感謝您的幫助!
看着這個線程:http://stackoverflow.com/questions/484719/html-anchors-with-name-or-id它看起來像使用如果我沒有弄錯,身份證而不是姓名是可以接受的方式 – Sam 2013-02-19 16:23:28