trim:function(str){标签:trim,function,功能,return,ltrim,js,str,replace From: https://blog.51cto.com/u_3871599/6138602
return str.replace(/(^\s*)|(\s*$)/g, "");
}
ltrim:function(str){
return str.replace(/(^\s*)/g, "");
}
rtrim:function(str){
return str.replace(/(\s*$)/g, "");
}