去掉左右空格

String.prototype.trim=function (){return this.replace(/(^\s*)|(\s*$)/g,'');}

去掉全部空格:String.prototype.mm = function (){return this.replace(/\s/g, '');}

相关文章:

  • 2021-08-13
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2021-10-15
相关资源
相似解决方案