日期:2014-05-17 浏览次数:20620 次
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$("#grid tr").each(function(){
//alert($(this).children('td').eq(3).text());
if($(this).children('td').eq(3).text()==9){
$(this).children('td').eq(3).css('background-color', 'red') .css('font-weight','bold');
}
});
})
</script>
<table id="grid" border="1">
<tr>
<td>61</td>
<td>1</td>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td>2</td>
<td>21</td>
<td>2</td>
<td>9</td>
</tr>
<tr>
<td>65</td>
<td>2</td>
<td>43</td>
<td>2</td>
</tr>
<tr>
<td>65</td>
<td>2</td>
<td>43</td>
<td>9</td>
</tr>
</table>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$("#grid tr").each(function(){
if($(this).find('td:eq(3)').text()==9){
$(this).find('td:eq(3)').css('background-color', 'red') .css('font-weight','bold');
}
});
})
</script>