标签:
function Trim(str,is_global) { var result = $.trim(str); result = str.replace(/(^\s+)|(\s+$)/g,""); if(is_global != undefined && is_global.toLowerCase()=="g") result = result.replace(/\s/g,""); return result; } var username=$(‘.name‘).val(); username=Trim(username);
标签:
原文地址:http://www.cnblogs.com/angleyuli/p/4626405.html