當網(wǎng)頁內(nèi)容太長或要導航到其它頁面的一個具體位置時,可以使用 Html 中書簽。
1.同一個web頁面鏈接
首先設(shè)計書簽
<a name=”top”></a>
在不同位置定義
<a href=”#top”>返回到top位置</a>
2.不同的頁面之間轉(zhuǎn)接
如果是在不同的頁面之間鏈接時要在href屬性中加上網(wǎng)頁名稱。
First.html中定義了書簽
<a name=”top”>Top的位置</a>
現(xiàn)在要從Second.html中轉(zhuǎn)入First.html并且將位置定到top所在的位置
可以設(shè)置
<a href=”first.html#top”>return first Top</a>
新聞熱點
疑難解答