我很好奇您为什么要使用 TR 执行此操作并尝试获取行高。
根据您用于获取数据的技术,将有一些组合数据的好方法。它是以 JSON 形式出现的吗?
也许您可以将其构建为流动行,并在添加记录时使用跨度使它们保持对齐。
此外,它还会在您添加数据时防止它失去对齐。
http://jsfiddle.net/4pdCq/7/
我导入了 bootstrap.css 来完成这项工作。
<div class="row-fluid rowBorder">
<div class="span4">Subject</div>
<div class="span2">Hour</div>
<div class="span4">Users</div>
</div>
<div class="row-fluid rowBorder">
<div class="span10">Monday</div>
</div>
<div class="row-fluid rowBorder">
<div class="span4">English English English english english english</div>
<div class="span2">3pm</div>
<div class="span4">User1</div>
</div>
<div class="row-fluid rowBorder">
<div class="span4">Espanol</div>
<div class="span2">4pm</div>
<div class="span4">User2</div>
</div>
<div class="row-fluid rowBorder">
<div class="span10">Tuesday</div>
</div>
<div class="row-fluid rowBorder">
<div class="span4">Italian</div>
<div class="span2">1pm</div>
<div class="span4">User3</div>
</div>
<div class="row-fluid rowBorder">
<div class="span4">French</div>
<div class="span2">2pm</div>
<div class="span4">User4</div>
</div>
<div class="row-fluid rowBorder">
<div class="span10">Wednesday</div>
</div>
<div class="row-fluid rowBorder">
<div class="span4">Japanese</div>
<div class="span2">10pm</div>
<div class="span4">User5</div>
</div>