JS - disable right click

0 votes
63 views
added May 23, 2022 in Javascript by lcjr First Warrant Officer (9,190 points)
<script id="no-rightclick" type="text/javascript">
document.ondragstart = function() { return false;}
	function nocontext(e) {
	   return false;
	}
	document.oncontextmenu = nocontext;
</script>

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...