/*
* 去掉开头和结尾的space, tab, form feed, and line feed (same as [\f\n\r\t\v]).
*/
function Trim(str){
return str.replace(/(^\s*)|(\s*$)/g, "");
}
js去掉开头和结尾的空格 js trim
最新推荐文章于 2022-12-11 22:07:59 发布
/*
* 去掉开头和结尾的space, tab, form feed, and line feed (same as [\f\n\r\t\v]).
*/
function Trim(str){
return str.replace(/(^\s*)|(\s*$)/g, "");
}