0
<table class="tbl">
<tr>td class= "colorcode" colspan ="5"/><tr>
<tr class="ms.alternative>
<td></td>
<td class="bkcolor"></td>
<td class="bkcolor"></td>
<td class="bkcolor"></td>
<td> </td>
</tr>
<tr><td colspan="5"/></tr>
<tr>td class= "colorcode" colspan ="5"/><tr>
<tr class="ms.alternative>
<td></td>
<td class="bkcolor"></td>
<td class="bkcolor"></td>
<td class="bkcolor"></td>
<td></td>
</tr>
<tr><td colspan="5"/></tr>
<tr>td class= "colorcode" colspan ="5"/><tr>
<tr class="ms.alternative>
<td></td>
<td class="bkcolor"></td>
<td class="bkcolor"></td>
<td class="bkcolor"></td>
<td></td>
</tr>
<tr><td colspan=""/></tr>
</table>
我是jquery的新手..請幫我弄明白。jQuery:find tr(class = x)get td(class = y)count td變量和屬性,比tr改變tr
在上面的場景:
現在我的問題是:你會如何選擇所有tr
與
class ms.alternative than find(td.bkcolor)
get the color of <td.bkcolor>
現在,如果:
(number of majority of background color of '`tr.ms.alternative`' '`td.bkcolor`'
is red)
{
change td.colorcode.css(background-color:'red')
}