js去掉最右边的逗号

str=(str.substring(str.length-1)==',')?str.substring(0,str.length-1):str;

原文地址:https://www.cnblogs.com/zhb7769/p/10005592.html