<html>
<body>
<p>This example uses the addEventListener() method to attach a "paste" event to an input element.</p>
<input type="text" id="myInput" value="Try to paste something in here" size="40">
<script>
document.getElementById("myInput").addEventListener("paste", myFunction);
function myFunction() {
alert("You pasted text!");
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onpaste_addeventlistener by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:02:58 GMT -->
</html>