Run
Back to
HTML onshow Event Attribute
<!DOCTYPE html > <html> <head> <title>onshow event</title> </head> <body> <div contextmenu="mymenu"> <p>Right click here to see the context menu.!</p> <menu type="context" id="mymenu" onshow="test()"> <menuitem label="Refresh" onclick="window.location.reload();"></menuitem> </menu> </div> <script> function test() { alert("EXAMPLE: The context menu will be shown!"); } </script> </body> </html>