去除字符串的前后空格

1 screen_splic: function (val) {
2     if (val != '' && val != undefined) {
3         return val.replace(/^(s|u00A0)+/,'').replace(/(s|u00A0)+$/,'');
4     }
5 }
原文地址:https://www.cnblogs.com/mxyr/p/9238280.html