开发者

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"; } );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜