JQuery比较两个数,并进行背景色填充 (有关问题升级了!难度加大了)

JQuery比较两个数,并进行背景色填充 (问题升级了!难度加大了)
例如:     这一行的第一个数字04,我想将围红中04下对用的这个单元格的背景色填充为红色     这一行的第二个数字10,我想将围红中10下对用的这个单元格的背景色填充为红色     ……     以此类推         当然了,整个红球这一大列的数字(6个数)是变化的,         我想用JQuery来实现,如果您有更好的想法,也可以

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>测试</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
<script type="text/javascript" src="js/jquery-1.10.1.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
    $("tr:gt(2)").each(function () {
        var tds = $("td.red_one", this);
        $("td.red_two", this).each(function () {
            var num = parseInt(this.innerHTML);
            if (tds[num - 1].innerHTML !== "")
                tds[num - 1].style.backgroundColor = "red";
        });
    });
});
</script>
</head>

<body>
    
    <br>

    <table align="center" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <table border="1" cellspacing="0" cellpadding="0">
                    <tr>
                        <td rowspan="2" height="18" width="72">期号</td>