<td style="display: none">
<c:choose>
<c:when test="${not empty demandDetail.undoneAmount}">
<span id="undoneAmount">${demandDetail.undoneAmount}</span>
</c:when>
<c:otherwise>
<span id="undoneAmount">0</span>
</c:otherwise>
</c:choose>
</td>
js方法:
$("span[id='undoneAmount']").each(function(){
var value = $(this).text();
alert(value);
});