SVG Event Attributes - SVG: Scalable Vector Graphics 编辑
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.
Attributes
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
, ondragexit
, 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
Browser compatibility
BCD tables only load in the browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论