使用正则表达式加上字符串对象的replace函数来实现trim功能。

$("#streamid").val().replace(/(^[\\s]*)|([\\s]*$)/g, "")

相关文章:

  • 2021-07-03
  • 2021-12-01
  • 2022-12-23
  • 2021-07-31
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-26
  • 2022-12-23
  • 2022-03-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案