<table class="tbody" id="maintable">
<col width="1200px"></col> <col width="1400px"></col> <col width="1400px"></col><col></col>
<tbody>
<s:iterator value="qinshulist" var="y" status="i">
<input type="hidden" name="qinshulist1[${i.index}].qinshuid" value="${y.qinshuid}">
<tr>
<td rowspan="3" style="text-align: center;width:7%">
<c:if test="${y.qstuts == 1}"><span class="text_red">${y.chengwei} </span></c:if>
<c:if test="${y.qstuts != 1}">${y.chengwei}</c:if>
</td>
<td rowspan="3" style="text-align: center;width:7%">${y.xingming} </td>
<td rowspan="3" style="text-align: center;width:6%">${y.minzu} </td>
<td style="text-align: center;width:7%" rowspan="3">
<c:if test="${3 == y.mianmaoid }">群众</c:if>
<c:if test="${2 == y.mianmaoid }">团员</c:if>
<c:if test="${1 == y.mianmaoid }">党员</c:if>
</td>
<td rowspan="2" style="width:10%">${y.iccard }</td>
<td style="text-align: left;width:20%">${y.jz_pro} ${y.jz_city} ${jz_county} ${jz_dizhi}</td>
<td style="width:10%">户口所在地派出所</td>
<td rowspan="3" style="text-align: center;width:6%">${y.memo} </td>
<td rowspan="3" style="text-align: center;width:7%">${y.riqi} </td>
<td rowspan="3" style="text-align: center;width:13%">
<input type="checkbox" name="checkboxqinshu1_${y.qinshuid}" value="4" onClick="changeboxqinshu(this,1,${y.qinshuid})" <c:if test="${(4 == y.qstuts) || (null == y.qstuts)|| (y.qstuts== 2)}">checked="checked"</c:if>>合格
<input type="checkbox" name="checkboxqinshu2_${y.qinshuid}" value="1" onClick="changeboxqinshu(this,2,${y.qinshuid})" <c:if test="${1 == y.qstuts}">checked="checked"</c:if>>不合格
<input type="checkbox" name="checkboxqinshu3_${y.qinshuid}" value="3" onClick="changeboxqinshu(this,3,${y.qinshuid})" <c:if test="${3 == y.qstuts}">checked="checked"</c:if>>重调
</td>
<td rowspan="3" style="width:7%" >
<label >
<textarea id="stumm_${y.qinshuid}" name="qinshulist1[${i.index}].qmemo" style="width: 98%; height:50px">${y.qmemo}</textarea>
</label>
</td>
</tr>
<tr>
<td style="text-align: left;width:20%">${y.jzp_pro} ${y.jzp_city} ${y.jzp_county} ${y.jzp_yb}</td>
<td style="width:10%">经常居住地派出所</td>
</tr>
<tr>
<td > ${y.mobile}</td>
<td >${y.danwei} ${y.tongxindizhi } ${y.dw_yb} </td>
<td >工作单位</td>
</tr>
</s:iterator>
</tbody>
</table>
js方法如下:
$(function(){
var i=0,j=0,k=0;
$("#maintable tr:gt(0)").each(function(n){
if($(this).find("td").size()==11){
j=$(this).find("td:eq(3)").attr("rowspan");
};
i++;
if(k%2==0){
$(this).css("backgroundColor","#f1f5f8")
};
if(i==j){
i=0;
k++;
};
});
});
实现效果不正确,rowspan=2的错开一行,rowspan=3的错开两行。。该怎么改求指教。