For body and other tag to prevent right click
<body oncontextmenu="return false;">
</body>
Using css prevent selection on website
body {
user-select: none;
}
Using jQuery
// With jQuery
$(document).on({
"contextmenu": function(e) {
console.log("ctx menu button:", e.which);
// Stop the context menu
e.preventDefault();
},
"mousedown": function(e) {
console.log("normal mouse down:", e.which);
},
"mouseup": function(e) {
console.log("normal mouse up:", e.which);
}
});