更新时间:2023-11-26 13:09:58
Hi,
Below is my code for image is present in html table cell or not.If yes,I want to change the color of row to green otherwise red.....
Thanks,
function getEtd(){
var count='0';
var TDs=document.getElementsByTagName('td')
var length=TDs.length;
i='0';
while(i<length){
if(TDs[i].innerHTML=='<img src=" />'){
// alert(TDs[i].innerHTML);
count++;
}
i++;
}
alert('there are '+count+' Image td\'s');
}