2011-01-15 12 views

risposta

17
$('textarea').bind('paste', function() { 
    var that = this; 
    setTimeout(function() { 
     var length = that.value.length; 
     alert(length);  
    }, 0); 

}); 

demo dal vivo:http://jsfiddle.net/4UrE3/1/

Lavori in Firefox 3.6, Chrome, Safari e IE9 beta. Non funziona in Opera.

+0

Funziona anche per IE8! –

+0

Perché funziona? –

+0

@Rocket Cosa intendi? –

Problemi correlati