1、  去掉字符串前后所有空格:

代码如下:

function Trim(str)
 { 
  return str.replace(/(^\s*)|(\s*$)/g, ""); 
}
View Code

 

相关文章:

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