Right-click the yellow box">

Right-click the yellow box" />

Easy Tutorial
❮ Att Input Accept Att Table Cellspacing ❯

HTML onshow Event Attribute

HTML Event Attributes

Example

Execute JavaScript when the <menu> element is displayed in the context menu:

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

Definition and Usage

The onshow attribute triggers when the <menu> element is displayed in the context menu.


Browser Support

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

Event Attribute Chrome Firefox IE Safari Opera
onshow Not supported Not supported 8.0 Not supported Not supported

Differences Between HTML 4.01 and HTML5

The onshow attribute is new in HTML5.


Syntax

Attribute Values

Value Description
script Script to be run on onshow

Technical Details

| Supported HTML tags: | <menu> | | --- | --- |


Related Pages

HTML DOM Reference: onshow Event

HTML Event Attributes

❮ Att Input Accept Att Table Cellspacing ❯