jQuery append problem
I have a problem with append()
working in IE but not in FF. I append text to a content in text area. if I 开发者_Python百科load textarea with text and then delete a few chars, and then try to append -- it does not work. Is there an alternative to it?
If you're working with a textarea
, you should be using .val()
to set its value instead of .append()
.
$('textarea').val( function( i, val ) { return val + "new text"; } );
精彩评论