2011-08-11 1 views

답변

4
$("tr td:first-child").each(function() { 
    var value = parseInt($(this).text(), 10); 
    if(value > 50 && value < 100) { 
     $(this).parent().remove(); 
    } 
}); 

이 반복은 번호로를 분석, 그 아이의 텍스트를 가져옵니다 및 제거 필요한 경우 부모 tr.

여기는 working example입니다.

2
$(function() 
{ 

    $("tr").each(function() 
    { 

     if(parseFloat($(this).find("td:first").text()) > 50 &&parseFloat($(this).find("td:first").text()) < 100) 
     { 

      $(this).remove(); 

     } 

    }); 

}); 

테스트하지 않았습니다! http://jsfiddle.net/ahallicks/BZdTP/ 또는

1

http://jsfiddle.net/Vwzya/

$('table tr').each(function() { 
    if ($(this).find('td:first').html() > 50 && $(this).find('td:first').html() < 100) 
     $(this).remove(); 
}); 
1

테이블에

$('#mytable tr').each(function() { 
    var var = $(this).find("td").eq(0).html(); 
    if(parseInt(var) > 50 && parseInt(var) < 100) 
    { 
     $(this).remove(); 
    }   
} 
관련 문제