遍历table指定name的td

$("td[name='rates']").each(function () {
var temp = $(this).text().substr(0,$(this).text().length-1);
if (temp < 0) {
$(this).css("color","red");
} else {
$(this).css("color", "green");
}
});

原文地址:https://www.cnblogs.com/lb12081116/p/4352790.html