Search This Blog
Popular Posts
- List of KeyAscii in VB6.0
- List of VB Keycode in Visual Basic 6.0
- Enable and Disable Button VB6 code
- Check valid Email Address in PHP code
- Clear Textbox when Onclick HTML Javascript code
- Get the Filename and the extension of Filename Visual Basic 6.0
- Disable Right-Click of Website - HTML code
- Latest Plate Number with barcode in the Philippines
Disable Right-Click of Website - HTML code
<html>
<head>
<script>
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;
}
function mousehandler(e){
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
</script>
</head>
<body>
right click disabled
</body>
</html>