textarea換行符轉化

代碼

var getFormatCode=function(strValue){  
    return strValue.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' ');  
}  
複製代碼
相關文章
相關標籤/搜索