onshow event
Examples
JavaScript is executed when the <menu> element is displayed in the context menu:
<Div contextmenu = "mymenu">
<P> Right-click inside this box to see the context menu!
<P> Right-click the yellow box area to view the context menu! </ P>
<Menuitem label = "refresh" onclick = "window.location.reload ();"> </ menuitem>
</ Menu>
</ Div>
<P> Right-click inside this box to see the context menu!
<P> Right-click the yellow box area to view the context menu! </ P>
<Menuitem label = "refresh" onclick = "window.location.reload ();"> </ menuitem>
</ Menu>
</ Div>
try it"
Definition and Usage
onshow event triggered when the <menu> element is displayed in the context menu.
Browser Support
Figures in the table represent the first browser to support this version of events.
event | |||||
---|---|---|---|---|---|
onshow | not support | not support | 8.0 | not support | not support |
grammar
In HTML:
<Elementonshow = "myScript"> try
In JavaScript:
object .onshow = function () {myScript }; try
JavaScript, use the addEventListener () method:
object .addEventListener ( "show", myScript ); try
Note: Internet Explorer 8 and earlier versions of IE do not support addEventListener () method.
technical details
Whether to support the bubble: | No |
---|---|
It can be canceled: | No |
Event Type: | Event |
Supported HTML tags: | <Menu> |
Related Pages
HTML Reference Manual: HTML attribute contextMenu
HTML Reference Manual: HTML <the MENU> tag
Event objects