如何检查 a 的任何孩子是否<tr>
包含 abackground:blue;
然后做某事?
$('table tr').each(function(index,value){
if (value.has('background:blue')){
alert (index); //do something to this row
}
});
<table>
<tr>
<td>dfgdfgdfgdf</td>
<td><input style="background:blue; value="test" /></td>
<td>gdfg</td>
<td><p style="background:blue;>cvcxvcxvx</p></td>
</tr>
<tr>
<td>gfdgdfg</td>
<td>gdfgfd</td>
<td style="background:blue;>dfgdf</td>
<td><div><div><button style="background:blue; type="submit"/></div></div></td>
</tr>
<tr>
<td>gfdgdfg</td>
<td>gdfgfd</td>
<td>dfgdf</td>
<td>dfgdf</td>
</tr>
<tr>
<td>gfdgdfg</td>
<td>gdfgfd</td>
<td>dfgdf</td>
<td><div><div><button style="background:blue; type="submit"/></div></div></td>
</tr>
</table>