jQuery Capture Paste Event to Paste the String to a Particular DOM

jQuery Capture Paste Event to Paste the String to a Particular DOM

I saw this solution but I'm not sure if this will work.

  1. $("#textareaid").bind("paste", function(e){ // access the clipboard using the api var pastedData = e.originalEvent.clipboardData.getData('text'); alert(pastedData); } );
What I'm trying to do is for example I have this string "Thanks 091215" in my clipboard copied from a different source. How when I hit press CTRL + V or clicked Paste on a particular page "Thanks" will be pasted to an Input Box, and "091215" will be pasted in a Textarea. More likely it will be stored in an array fashion.


Is this possible?