【发布时间】:2012-02-20 20:08:48
【问题描述】:
大家好,我想将<td> 单元格的所有内容放入mouseOver。我目前正在做一个 forEach 来用元素填充单元格。有些单元格中有一个元素数组。我希望单元格中的内容也成为 MouseOver 上出现的内容。我不确定如何格式化 title= 以适应。
<table align="center" class="data_extract vert_scroll_table" >
<tr>
<c:forEach var="heading" items="${results.headings}">
<th class="data_extract">${heading}</th>
</c:forEach>
</tr>
<c:forEach var="row" items="${results.data}">
<tr>
<c:forEach var="cell" items="${row}" varStatus="rowStatus">
<td class="data_extract">
<c:choose>
<c:when test="${results.types[rowStatus.index].array}">
<c:forEach var="elem" items="${cell}" varStatus="cellStatus">
<span class="mouseover_text" title="${elem}, ">${elem}<c:if test="${!cellStatus.last}">, </c:if></span>
</c:forEach>
</c:when>
<c:otherwise>
${cell}
</c:otherwise>
</c:choose>
</td>
</c:forEach>
</tr>
</c:forEach>
</table>
我基本上是想在这里循环完成后:
<c:when test="${results.types[rowStatus.index].array}">
<c:forEach var="elem" items="${cell}" varStatus="cellStatus">
${elem}<c:if test="${!cellStatus.last}">, </c:if>
</c:forEach>
将结果放在标题中:
<span class="mouseover_text" title= </span>
【问题讨论】: