日期:2014-05-16 浏览次数:20467 次
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, "");