jQuery bind to Paste Event, how to get the content of the paste

后端 未结 9 1043
温柔的废话
温柔的废话 2020-11-28 06:08

I have a jquery token tagit plugin and I want to bind to the paste event to add items correctly.

I\'m able to bind to the paste event like so:

    .b         


        
9条回答
  •  执念已碎
    2020-11-28 07:14

    This work on all browser to get pasted value. And also to creating common method for all text box.

    $("#textareaid").bind("paste", function(e){       
        var pastedData = e.target.value;
        alert(pastedData);
    } )
    

提交回复
热议问题