开发者

Which DOM events can be bound to a DIV element?

As per questio开发者_StackOverflown in the title...


There's a complete list of DOM events here, which includes browser-specific and touch-interface events as well. All the Mouse and Keyboard events can be attached to a div, which are:

mousedown, mouseup, mouseover, mousemove, mouseout, click, dblclick, keydown, keypress, keyup


There are various events which can be performed on div tags such as

ondrag,
ondragcenter,
ondragleave,
ondrop,
ondragover,
ondragstart,
ondragend,
onscroll 


event Attributes you can use:

onclick, ondblclick, onmousedown, onmousemove, onmouseout, 
onmouseover, onmouseup, onkeydown, onkeypress, onkeyup

See more about the <div> tag here, and general DOM events here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜