SVG Event Attributes

Event attributes always have their name starting with "on" followed by the name of the event for which they are intended. They specifies some script to run when the event of the given type is dispatched to the element on which the attributes are specified.

For every event type that the browser supports, SVG supports that as an event attribute, following the same requirements as for HTML event attributes.

The global event attributes are available on all SVG elements . Other event attributes are available on a case by case basis for each elements.

All event attribute are not animatable .

属性

Animation Event Attributes

onbegin , onend , onrepeat

Document Event Attributes

onabort , onerror , onresize , onscroll , onunload

Document Element Event Attributes

oncopy , oncut , onpaste

Global Event Attributes

oncancel , oncanplay , oncanplaythrough , onchange , onclick , onclose , oncuechange , ondblclick , ondrag , ondragend , ondragenter , ondragleave , ondragover , ondragstart , ondrop , ondurationchange , onemptied , onended , onerror , onfocus , oninput , oninvalid , onkeydown , onkeypress , onkeyup , onload , onloadeddata , onloadedmetadata , onloadstart , onmousedown , onmouseenter , onmouseleave , onmousemove , onmouseout , onmouseover , onmouseup , onmousewheel , onpause , onplay , onplaying , onprogress , onratechange , onreset , onresize , onscroll , onseeked , onseeking , onselect , onshow , onstalled , onsubmit , onsuspend , ontimeupdate , ontoggle , onvolumechange , onwaiting

Graphical Event Attributes

onactivate , onfocusin , onfocusout

浏览器兼容性

BCD tables only load in the browser

Found a problem with this page?

最后修改: , 由 MDN 贡献者

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1