It seems that the only way to add the onPaste event to the input element is to use HTML:
<textarea id="text_area" onpaste="on_paste" />
not the ability to attach an event handler using javascript:
document.getElementById('text_area').onPaste = function() { alert('I iz in ur textbox, pasting some text') };
On the MSDN website, you can add event handlers for onPaste using jscript or HTML, but I want to do this in javascript. Is there any way to do this?
source
share