trim(str) {
var reg = /\s+/g
if (typeof str === 'string') {
var trimStr = str.replace(reg, '')
}
return trimStr
}
js去除字符串全部空格
猜你喜欢
转载自blog.csdn.net/qq_45325810/article/details/129418437
今日推荐
周排行