JS jQuery使用正则表达式去空字符的简单实现代码 1.正则去空字符串;varstr1="abc";varstrtrim=str1.replace(/\s/g,"");2.js去前后空字符串;varstrtrim=str1.tr 正则去字符