我現在有兩個選項卡在此頁:導航到頁面的特定錨
我想要做的是,每當我瀏覽這個網頁,我希望頁面默認打開Reviews
選項卡,而不是Description
選項卡。
當您將鼠標懸停在Description
選項卡上時,您將看到此URL彈出localhost:8080/#tab-description
,並分別彈出localhost:8080/#tab-review
。
當我打開此頁面時,我想鏈接到第二個選項卡,即#tab-review
,因爲現在,默認選項卡是第一個,#tab-description
。
重定向發生通過一個名爲order_info.tpl
View
,我使用該URL生成:
<a href="<?php echo $product_url . $product['product_id'] . $tab_review; ?>" class="button"> FEEDBACK </a>
$product_url
是其被定義爲http://someurl:8080/index.php?route=product/product&product_id=
,其中$product['product_id']
是產品ID我在我的控制器設定的URL這是根據特定頁面的產品ID而動態確定的。
我已經試過什麼:
我試圖將#tab-review
錨添加到我的網址的結尾,但這並沒有解決我的問題,即http://192.168.16.34:8080/index.php?route=product/product&path=772_774&product_id=1791#tab-review
任何幫助,將不勝感激
我會給你買蝦爲您使用的標籤什麼各佔 – 2014-12-08 02:38:29
? jQuery的? – Kraiden 2014-12-08 02:48:21
@Kraiden Yessir。 – theGreenCabbage 2014-12-08 02:49:36