?
function Trim(str,is_global) { var result; result = str.replace(/(^\s+)|(\s+$)/g,""); if(is_global.toLowerCase()=="g") result = result.replace(/\s/g,""); return result; }
?第一个去左右空格;is_global='g',去中间空格
?
function Trim(str,is_global) { var result; result = str.replace(/(^\s+)|(\s+$)/g,""); if(is_global.toLowerCase()=="g") result = result.replace(/\s/g,""); return result; }
?第一个去左右空格;is_global='g',去中间空格