过滤数组中的空字符串 var data = [‘’, ‘ ‘, ‘ ’, ‘sdf’, ‘sdgfa’, ‘ ’]; data.trim() // [‘sdf’, ‘sdgfa’] // 注:IE9(不包含IE9)以下的版本没有trim()方法