110
rated 0 times
[
114]
[
4]
/ answers: 1 / hits: 8690
/ 6 Years ago, tue, march 13, 2018, 12:00:00
I want users to be able to right click and have the custom contentmenu have two choices:
Contact (with link https://rowurbux.weebly.com/contact.html)
Support (with link https://rowurbux.weebly.com/support.html)
<html>
<head>
<script type=text/javascript>
if (document.addEventListener) { // IE >= 9;other browsers
document.addEventListener('contextmenu', function(e) {
alert(You've tried to open context menu); //here you draw your own menu
e.preventDefault();
}, false);
} else { // IE < 9
document.attachEvent('oncontextmenu', function() {
alert(You've tried to open context menu);
window.event.returnValue = false;
});
}
</script>
</head>
<body> Lorem ipsum... </body>
</html>
Help me out with this please!
Thanks everybody,
Will
A JS or HTML answer is perferrable
More From » html