Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript condition based on table cell value

$(document).ready(function () {
    $("#tblstudents td:nth-child(3)").each(function () {
        if (parseInt($(this).text(), 10) <= 400) {
            $(this).parent("tr").css("background-color", "red");
        }
    });
});
Source by dotnetlearners.com #
 
PREVIOUS NEXT
Tagged: #javascript #condition #based #table #cell
ADD COMMENT
Topic
Name
1+1 =