去除字符串的前后空格

1 screen_splic: function (val) {
2     if (val != '' && val != undefined) {
3         return val.replace(/^(\s|\u00A0)+/,'').replace(/(\s|\u00A0)+$/,'');
4     }
5 }

猜你喜欢

转载自www.cnblogs.com/mxyr/p/9238280.html
今日推荐