/*
* 去掉开头和结尾的space, tab, form feed, and line feed (same as [\f\n\r\t\v]).
*/
function Trim(str){
return str.replace(/(^\s*)|(\s*$)/g, "");
}
正则表达式-删除搜索条件的首尾的空格
最新推荐文章于 2024-06-24 11:55:41 发布
/*
* 去掉开头和结尾的space, tab, form feed, and line feed (same as [\f\n\r\t\v]).
*/
function Trim(str){
return str.replace(/(^\s*)|(\s*$)/g, "");
}