function strTrim(str){
str = str.replace(/(^\s*)|(\s*$)/g, "");
return str;
}
使用js去除首尾空格
最新推荐文章于 2022-12-11 22:07:59 发布
function strTrim(str){
str = str.replace(/(^\s*)|(\s*$)/g, "");
return str;
}