根据表格特定列的内容来追加图标

$("#tableData tbody tr").each(function(i,n){
		
		if($(this).find("td:nth-child(4)").text()>0){
			$(this).find("td:last").append(' '+ '<i class="fa fa-long-arrow-up" style="color:red;"></i>');
		}else{
			$(this).find("td:last").append(' '+ '<i class="fa fa-long-arrow-down" style="color:#03a403;"></i>');
		}
		
	 })

若是最后列的内容为正数追加上升图标,若是为负数追加降低图标javascript

相关文章
相关标签/搜索