| 屬性 | 說明 |
|---|---|
href | 目標 URL 或錨點 (#id) |
target | 開啟目標:_blank/_self/_parent/_top/框架名稱 |
rel | 關係:nofollow/tag/license/alternate 等 |
hreflang | 目標資源語言代碼 |
type | MIME 類型提示 |
title | 工具提示文字 |
id / class | 識別與樣式鉤子 |
name | 錨點名稱 (HTML5 建議用 id) |
charset | 目標資源字元集 (已淘汰) |
coords / shape | 配合 image map 使用 |
accessKey | 快捷鍵 |
tabIndex | Tab 鍵順序 |
protocol、host、hostname、port、pathname、search (query string)、hash (fragment)offsetLeft/Top/Width/Height:相對 offsetParent 座標clientLeft/Top/Width/Height:內容區尺寸 (不含邊框/捲軸)scrollLeft/Top/Width/Height:捲動相關| 事件 | 觸發時機 |
|---|---|
onclick | 左鍵點擊 |
ondblclick | 雙擊 |
onmousedown/up/move/over/out | 滑鼠動作 |
onfocus/blur | 焦點獲得/失去 |
onkeydown/keypress/keyup | 鍵盤 |
onactivate/deactivate | 元素啟用/停用 (IE) |
onbeforecopy/cut/paste | 剪貼板前 |
oncopy/cut/paste | 剪貼板後 |
ondrag/start/end/enter/leave/drop | 拖曳 (HTML5) |
oncontextmenu | 右鍵選單 |