为什么replace无法替换字符呢
var selectedEmployeeIds = "";
var selectedEmployeeNames = "";
$(".jemployee_data").click(function(){
//$(this).find("td:first").html()+",";
var curEmployeeId = $(this).children().eq(0).html()+",";
var curEmployeeName = $(this).children().eq(2).html()+",";
if ($(this).hasClass("jemployee_selected")){
$(this).removeClass("jemployee_selected");
selectedEmployeeIds.replace(curEmployeeId, "");
selectedEmployeeNames.replace(curEmployeeName, "");
selectedEmployeeCount--;
}else{
$(this).addClass("jemployee_selected");
selectedEmployeeIds += curEmployeeId;
selectedEmployeeNames += curEmployeeName;
selectedEmployeeCount++;
}
selectedEmployeeIds.replace(curEmployeeId, "");
selectedEmployeeNames.replace(curEmployeeName, "");
selectedEmployeeIds=selectedEmployeeIds.replace(curEmployeeId, "");
selectedEmployeeNames=selectedEmployeeNames.replace(curEmployeeName, "");