字符串
var basic = "abc,def,ghi,";
第一种
basic = basic.substr(0, basic.length - 1);
第二种
basic = basic.substring(0, basic.length - 1);
第三种
basic = basic.substring(0, basic.lastIndexOf(','));