开发者

Which DOM events can be bound to a DIV element?

开发者 https://www.devze.com 2023-04-02 05:15 出处:网络
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 ca

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

精彩评论

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

关注公众号