textarea 显示换行

var haha=document.getElementById("Conds").value;
haha=haha.replace(/<br>/g," ").replace(new RegExp(/( )/g),"");
document.getElementById("Conds").value=haha;

原文地址:https://www.cnblogs.com/emanlee/p/13960796.html