अनुवादक

शनिवार, 27 मार्च 2021

कॉपी पेस्ट बंद करने के लिए कोड

 कॉपी पेस्ट रोकने के लिए कोड जिन्हें जावा/html गेजेट में लिखने पर बंद हो जाएगी कॉपी पेस्ट


कोड 1 

 <style>body {

user-select: none !important;

-moz-user-select: -moz-none !important;

-webkit-user-select: none !important;

-ms-user-select: none !important;

}

.post-body blockquote, .post-body pre, .post-body code {

user-select: text !important;

-webkit-user-select: text !important;

-ms-user-select: text !important;

-moz-user-select: text !important;

}

</style>

कोड 2  सभी बंद करने के लिए

<script type='text/javascript'>

 if (typeof document.onselectstart != "undefined") {

 document.onselectstart = new Function("return false");

 } else {

 document.onmousedown = new Function("return false");

 document.onmouseup = new Function("return false");

 }

</script>

कोई टिप्पणी नहीं:

एक टिप्पणी भेजें