JavaScript中使用Substring删除字符串最后一个字符

  String str = "a,b,c,";

  我们需要删除最后的英文逗点,该怎么办呢?

  方法:

  1、Substring

  str=str.Substring(0,s.Length-1)