posts - 262,  comments - 221,  trackbacks - 0
          資料來源:www.w3cschools.com

          一、HTML中的href屬性:

          The <a> tag is used to create an anchor to link from, the href attribute is used to address the document to link to, and the words between the open and close of the anchor tag will be displayed as a hyperlink.

          <a >Visit W3Schools!</a>

          備注:
          1). 像href=” 2). 如果href屬性的值以/開頭,則表示相對于服務器的根目錄,如果沒有則表示相對于當前頁面

          二、HTML中的target屬性:

          With the target attribute, you can define where the linked document will be opened.

          <a href="

          三、HTML中的name屬性:

          The name attribute is used to create a named anchor. When using named anchors we can create links that can jump directly into a specific section on a page, instead of letting the user scroll around to find what he/she is looking for.

          You should notice that a named anchor is not displayed in a special way.To link directly to the "tips" section, add a # sign and the name of the anchor to the end of a URL.

          <a name="tips">Useful Tips Section</a>

          備注:
          一個被錨標記標注的文本并不會有什么特別的顯示,要想使用錨標記進行頁間跳轉,只需要在URL的末尾加上一個#號和錨標記的名稱就可以了。如果是進行頁內跳轉則簡單地使用#號加錨標記的名稱就可以了(連URL都不用了)。

          <a >
              Jump to the Useful Tips Section
          </a>

          <a href="#tips">Jump to the Useful Tips Section</a>

          四、關于超鏈接的一些注意點:

          Always add a trailing slash to subfolder references. If you link like this: , you will generate two HTTP requests to the server, because the server will add a slash to the address and create a new request like this:

          Named anchors are often used to create "table of contents" at the beginning of a large document. Each chapter within the document is given a named anchor, and links to each of these anchors are put at the top of the document.

          If a browser cannot find a named anchor that has been specified, it goes to the top of the document. No error occurs.



          -------------------------------------------------------------
          生活就像打牌,不是要抓一手好牌,而是要盡力打好一手爛牌。
          <2008年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          常用鏈接

          留言簿(21)

          隨筆分類

          隨筆檔案

          BlogJava熱點博客

          好友博客

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 隆尧县| 锡林郭勒盟| 凤翔县| 额尔古纳市| 五常市| 日土县| 扶风县| 北海市| 阿图什市| 云安县| 安宁市| 怀安县| 牙克石市| 沙坪坝区| 纳雍县| 金沙县| 柳州市| 广汉市| 新乡县| 常德市| 东阿县| 临武县| 洪洞县| 五峰| 那曲县| 祁阳县| 普定县| 海门市| 汉沽区| 鄱阳县| 新竹县| 咸丰县| 司法| 枝江市| 卢龙县| 潢川县| 蓝田县| 定日县| 剑川县| 大同市| 永清县|