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