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);
时间: 2024-10-08 10:21:52