答案 0 :(得分:1)
这是你的解决方案:
$(document).ready(function(){
$('tr').find('td').each(function(i){
var ind = $(this).index();
var text = $(this).text();
var header_text = $('thead > tr').find('th:eq('+ind+')').text();
$(this).text(header_text+': '+text);
});
});