Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML onshow Attribute


Definition and Usage

The onshow attribute fires when a <menu> element is shown as a context menu.


Applies to

The onshow attribute is part of the Event Attributes, and can be used on the following element:

Elements Event
<menu> onshow

Example

Execute a JavaScript when a <menu> element is shown as a context menu:

<div contextmenu="mymenu">
  <p>Right-click inside this box to see the context menu!
  <menu type="context" id="mymenu" onshow="myFunction()">
    <menuitem label="Refresh" onclick="window.location.reload();"></menuitem>
  </menu>
</div>
Try it Yourself »

Browser Support

The numbers in the table specify the first browser version that fully supports the event attribute.

Event Attribute
onshow Not supported Not supported 8.0 Not supported Not supported