$(".commentbox").on("click",".btnSave",function(){
var id = $(this).attr("id").split("-");
alert(id);
id.shift();
alert(id);
var newString = id.join('-');
alert(newString);
});
});
输入是btnSave-88eC4B8D2-8F96-4EB5-B42E-08C540D7F171
输出 :88eC4B8D2,8F96-4EB5,B42E,08C540D7F171
虽然它适用于btnReply
按钮为什么请帮帮我