我想建立一個菜單,將用戶引導到同一個網頁頁面的具體位置,但diffent位置直接用戶
<ul>
<li><a href="realtime.php#location1">location 1 in page</a></li>
<li><a href="realtime.php#location2">location 2 in page</a></li>
</ul>
這裏是頁面的HTML:(realtime.php)
<div id="location1" name="location1"></div>
<some html....>
<div id="location1" name="location1"></div>
<some other html...>
它不適用於我: 1.它不會重定向到頁面內的正確位置 2.如果我正在查看當前頁面,它什麼也不做 - >意義甚至不會重新加載這一頁。
如果您的網址和您的錨具有不同的名稱中的鏈接,他們怎麼能工作呢? 'location1'找不到'squeeze'或'ETF' – dnagirl
http://stackoverflow.com/questions/484719/html-anchors-with-name-or-id – 2012-10-15 14:36:26
嗨@dnagirl,謝謝你的回覆。我糾正了錯誤。它仍然無法正常工作。 – devmonster