Html oncontextmenu method
<body oncontextmenu="menu()">
<h2 align="center">Javascript event right click</h2>
<p id="p" hidden>This is menu.</p>
</body>
<script>
function menu() {
event.preventDefault();
document.getElementById('p').style.display = 'block';
}
</script>