<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Disabling cut, copy, paste, right click and context menu using Javascript </title>
<script type="text/javascript">
//below javascript is used for Disabling right-click on HTML page
document.oncontextmenu=new Function("return false");//Disabling right-click
//below javascript is used for Disabling text selection in web page
document.onselectstart=new Function ("return false"); //Disabling text selection in web page
if (window.sidebar){
document.onmousedown=new Function("return false");
document.onclick=new Function("return true") ;
//Disable Cut into HTML form using Javascript
document.oncut=new Function("return false");
//Disable Copy into HTML form using Javascript
document.oncopy=new Function("return false");
//Disable Paste into HTML form using Javascript
document.onpaste=new Function("return false");
}
</script>
</head>
<body>
how to Disable cut, copy, paste, right click and context menu using Javascript
</body>
</html>
<html>
<head>
</head>
<body oncopy="return false;" onpaste="return false;" oncut="return false;">
<div>
Disabling cut, copy, paste, right click using Javascript
</div>
</body>
</html>
0 মন্তব্য(গুলি):
একটি মন্তব্য পোস্ট করুন