-1

I try lot of javascript and php for completely remove copy past to my site .. but lot of Plugins available for override copy past.. example plugin for chrome "Don't F*** With Paste"

Any one know how to save my site? i need disable my copy past completely in my inputbox

Email: <input type="textbox" id="email"><br/>

 <script type="text/javascript">
    window.onload = function() {
        const myInput = document.getElementById('email');
        myInput.onpaste = function(e) {
        e.preventDefault();
        }
    }
</script>

this also not work

onCopy="return false" onDrag="return false" onDrop="return false" 
onPaste="return false"

this one also not work with that plugins

Jon Clements
  • 138,671
  • 33
  • 247
  • 280
Raj Mohammed
  • 173
  • 1
  • 3
  • 10
  • 4
    Possible duplicate of [How to Disable Copy Paste (Browser)](https://stackoverflow.com/questions/9958478/how-to-disable-copy-paste-browser) – TsunDoge Oct 24 '18 at 06:06
  • 2
    You are being downvoted due to vulgar language which is not allowed on SE sites. You will find more people willing to help you if the question is worded without such. https://meta.stackexchange.com/questions/22232/are-expletives-cursing-swear-words-or-vulgar-language-allowed-on-se-sites/22233#22233 – Geek Stocks Oct 24 '18 at 06:21
  • 1
    @Geek Stocks: [That really isn't his fault.](https://chrome.google.com/webstore/detail/dont-fuck-with-paste/nkgllhigpcljnhoakjkgaieabnkmgdkb?hl=en) Though, admittedly, he could've chosen to link to the extension without naming it outright... – BoltClock Oct 24 '18 at 08:06
  • @BoltClock: I try to help OP's understand why they get a downvote instead of just moving on. I find commenting on the situation helps. Agree with you that I hope he edits...soon. – Geek Stocks Oct 24 '18 at 09:24

1 Answers1

1

Use this:

<input type="text" oncontextmenu="return false" onkeydown="if ((arguments[0] || window.event).ctrlKey) return false">
Jack Bashford
  • 43,180
  • 11
  • 50
  • 79