Open lcgyh opened 7 years ago
怎么去除字符串空格?
str = str.replace(/\s+/g,"");
str = str.replace(/^\s+|\s+$/g,"");
str=str.replace( /^\s*/, '');
str=str.replace(/(\s*$)/g, "");
怎么去除字符串空格?