19

私は jQuery の $.trim() 関数を知っていますが、必要なのは、文字列の先頭からではなく、末尾からのみ空白を削除する方法です。

そう

  str ="     this is a string     ";

になるだろう

  str ="     this is a string";

助言がありますか?

ありがとう!

4

2 に答える 2