这个oncontextmenu
当用户发生事件时右键单击 HTML 元素打开上下文菜单。
Event | Occurs When |
---|---|
onclick | The user clicks on an element |
oncontextmenu | The user right-clicks on an element |
ondblclick | The user double-clicks on an element |
onmousedown | A mouse button is pressed over an element |
onmouseenter | The pointer is moved onto an element |
onmouseleave | The pointer is moved out of an element |
onmousemove | The pointer is moving over an element |
onmouseout | The mouse pointer moves out of an element |
onmouseover | The mouse pointer is moved over an element |
onmouseup | The mouse button is released over an element |
气泡: | 是的 |
---|---|
可取消: | 是的 |
事件类型: | 鼠标事件 |
HTML 标签: | 所有 HTML 元素 |
DOM 版本: | 3 级活动 |
oncontextmenu
是 DOM Level 3 (2004) 功能。
所有现代浏览器都完全支持它:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!