var getFormatCode=function(strValue){ return strValue.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' '); } 複製代碼