html 打开页面事件,html 页面 事件

事件

Only valid in body and frameset elements.

只在body和frameset元素中才有效

Attribute Value Description

onload script Script to be run when a document loads [装载时]

onunload script Script to be run when a document unloads [卸载时]

--------------------------------------------------------------------------------

Form Element Events

表单元素事件

Only valid in form elements.

在表单元素中才有效。

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[元素得到焦点时...]

--------------------------------------------------------------------------------

Keyboard Events

键盘事件

Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements.

在 base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style,和 title 元素里都无效.

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[当键释放时做什么]

--------------------------------------------------------------------------------

Mouse Events

鼠标事件

Not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, title elements.

在 base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style,和 title 元素里都无效.

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 [鼠标释放时]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值