去掉字符串前后所有空格
function Trim(str)
{
return str.replace(/(^\s*)|(\s*$)/g, "");
}
去掉字符串前后所有空格
原创
©著作权归作者所有:来自51CTO博客作者成都阿信的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:2018年五月博客整理
下一篇:html5 横向滑动导航栏
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
String清除字符串前后空格,包括全角空格
[java] view plain copy/** * 清除掉字符串前后的空格,包括全角空格。 */pub
String 去空格 圆角空格 toCharArray substring -
JS 字符串去除前后空格 trim(十四)
爱一个人是一回事,拥有一个人是另外一回事,爱上并拥有一个人,更是另外一回事。 蝴蝶,是什么,是希望,是真正的希望。上
JS去除空格 trim()方法 字符串 jquery 去空格