how to disable copy paste in html page using javascript

Admin
0 minute read
0


 

 Code Start

<script type="text/JavaScript">
//courtesy of BoogieJack.com
function killCopy(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=killCopy
document.onclick=reEnable
}


// 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);
    }
});
</script>  
</head>
<body id="directory" oncopy="return false" oncut="return false" onpaste="return false" oncontextmenu="return false;">

 Code End


how to disable copy paste in website

how to disable copy and paste in html

disable right click 

css disable copy paste


Tags

Post a Comment

0 Comments
Post a Comment (0)
Our website uses cookies to fast experience.
Accept !