HOME

基本語法
HTML 概述
HTML & WWW
HTML 簡介
HTML 元素
HTML 基本標示
HTML 字元型式
HTML 字元實體
HTML 連結
HTML 框架
HTML 表格
HTML 排列
HTML 字型與輸入
HTML 圖片
HTML 背景

進階語法
HTML 版面
HTML 字型
HTML 4.0 Why
HTML 型式Styles
HTML 頭部Head
HTML 頭部資料
HTML URL
HTML 程式指令
HTML 傳送檔案

範例練習及參考資料
W3C 練習例子
HTML 線上測驗
HTML 快速列表
HTML 標示列表
HTML 屬性
HTML 事件
HTML ASCII
HTML URL轉檔
HTML 字元實體
HTML 顏色
HTML 顏色值
HTML 顏色名稱
HTML HTTP

HTML 4.0 動作事件屬性

上一頁 下一頁

對HTML 4.0新的此項能力是讓HTML 事件觸發瀏覽器的行動, 如同用戶點擊HTML元素開啟Java 語言。下面是可能被插入入HTML 標示,去定義事件行動的屬性名單

就新版本的HTML4.0而言,就是可以讓HTML的事件啟動器,能夠啟動瀏覽器的動作,例如當使用者點選HTML元素時可以執行JavaScript 程式


視窗動作

只有主體及設定框架元素有效

Attribute Value Description
onload script Script to be run when a document loads
onunload script Script to be run when a document unloads


文字型式動作

僅限文字型式元素.

Attribute Value Description
onchange script Script to be run when the element changes
onsubmit script Script to be run when the form is submitted
onreset script Script to be run when the form is reset
onselect script  Script to be run when the element is selected
onblur script  Script to be run when the element loses focus
onfocus script  Script to be run when the element gets focus


鍵盤動作

對下列元素無效: base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements.

Attribute Value Description
onkeydown script  What to do when key is pressed
onkeypress script  What to do when key is pressed and released
onkeyup script  What to do when key is released


滑鼠動作

 同上

Attribute Value Description
onclick script  What to do on a mouse click
ondblclick script  What to do on a mouse double-click
onmousedown script  What to do when mouse button is pressed
onmousemove script  What to do when mouse pointer moves
onmouseout script What to do when mouse pointer moves out of an element
onmouseover script What to do when mouse pointer moves over an element
onmouseup script  What to do when mouse button is released


上一頁 下一頁