As mentioned in the Question how can I get the pasted content on document.As of now I am creating a text area and dblclick to get the focus into textarea and then on paste event of the textarea I am collecting the data. I dont think this is a good approach. My code is below
$('body').dblclick(function()
{
$('#textare').focus();
});
Then
$('#textare').keyup(function()
{
alert( $(this).val() );
});
Please suggest me a alternative process.
I am looking for alternative like
$(document).paste(function()
{
// Get the pasted content
});
I am using google chrome browser. I dont want to use textarea to catch the text.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…