WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML onshow Event Attribute

HTML Event Attributes HTML Event Attributes

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 »

Definition and Usage

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


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

Differences Between HTML 4.01 and HTML5

The onshow attribute is new in HTML5.


Syntax

<element onshow="script">

Attribute Values

Value Description
script The script to be run on onshow

Technical Details

Supported HTML tags: <menu>

Related Pages

HTML DOM reference: onshow event


HTML Event Attributes HTML Event Attributes