trim

去掉字符串起始和结尾的空格。

jQuery 代码:

$.trim(" hello, how are you? ");

结果:

"hello, how are you?"

posted @ 2016-06-23 18:30  Chris_在IT道路上前行  阅读(103)  评论(0)    收藏  举报