There's 2 main ways I thought of doing this: having some script execute once the window loads or having an event fire when a user tries to paste. The example below illustrates both. The only thing to keep in mind is that for the script in window.onload, onpaste will not disable pasting if it is equal to false, it needs to be equal to a function, even if that function only returns false.
<!DOCTYPE html>
<html>
<head>
<script type = "text/javascript">
window.onload = function() {
document.getElementById("paste2").onpaste = noPaste;
}
function noPaste() {
return false;
}
function preventPaste(x) {
return false;
}
</script>
</head>
<body>
<form>
<input type = "text" placeholder = "can paste in here" />
<br />
<input type = "text" id = "paste1" onpaste = "return preventPaste(this)" />
<br />
<input type = "text" id = "paste2" />
</form>
</body>
</html>