HTML onshow event properties
Examples
JavaScript is executed when the <menu> element is displayed in the context menu:
<Div contextmenu = "mymenu">
<P> Right-click the yellow box area to view the context menu! </ P>
<Menu type = "context" id = "mymenu" onshow = "myFunction ()">
<Menuitem label = "refresh" onclick = "window.location.reload ();"> </ menuitem>
</ Menu>
</ Div>
<P> Right-click the yellow box area to view the context menu! </ P>
<Menu type = "context" id = "mymenu" onshow = "myFunction ()">
<Menuitem label = "refresh" onclick = "window.location.reload ();"> </ menuitem>
</ Menu>
</ Div>
try it"
Definition and Usage
onshow property triggers when <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 Properties | |||||
---|---|---|---|---|---|
onshow | not support | not support | 8.0 | not support | not support |
The difference between HTML 4.01 and HTML5
onshow HTML5 attribute is new.
grammar
<Elementonshow = "script">
Property Value
value | description |
---|---|
script | The script is executed onshow |
technical details
Supported HTML tags: | <Menu> |
---|
Related Pages
HTML DOM Reference: OnShow event