ID的父亲的其他兄弟的第二个儿子颜色
$.each(data,function(index,obj){
$("#tablel").append("<tr align='center' bgcolor='white'>"
+"<td class='tdcolor'>" + (index + 1) + "</td>"
+"<td class='tdcolor' onclick='addcolor(this.id)' id='t"+index+"'>" + obj['deviceId'] + "</td>"
+"</tr>");
});
function addcolor(x){// 点击该ID 颜色变 点另一个ID的时候恢复(另一个ID 颜色变) 该元素ID的父亲的其他兄弟的第二个儿子颜色
$("#"+x).css('color','#00a0f0').parent().siblings().children(1).css('color','#000');//.siblings() 同辈的其他效果变色
}
下面是没用的 哭
var tdid = td.eq(1).attr("id"); //获取点击tr的子元素ID //$("#"+tdid).css("color","red"); //$('#tablel tr:not(this)').removeClass("current"); //todo
// $(this).addClass("current");