TextArea 回车换行的显示

$(".textareashow").each(function(i){
var content = $.trim($(this).text());
var newcontent = content.replace(/\n/g,'<br/>');
$(this).html(newcontent);
});

posted @ 2015-01-28 14:23  roscee  阅读(530)  评论(0编辑  收藏  举报