1.  java方式

String.trim();

 

2.js方式

1 function Trim(str)
2          { 
3              return str.replace(/(^\s*)|(\s*$)/g, ""); 
4      }

 

 

3.jQuery方式

  var $title = $.trim($("#title").val());

相关文章:

  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-14
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
相关资源
相似解决方案