我有一个链接到 jquery 页面的 html 页面,但无法正常工作。我正在使用 jquery 来查找单元格值低于 3000 的单元格,然后应该填充单元格,目前它不起作用。
这是html代码
$(document).ready(function () {
rr();
})</script>
</head>
<body>
<table class="colorMe">
<tr><td>2000</td><td>3500</td></tr>
<tr><td>3000</td><td>2500</td></tr>
<tr><td>4000</td><td>4500</td></tr>
</table>
</body>
</html>
and here is the jquery code which is on a seperate page
// JavaScript Document
$("#d td").each(function rr() {
var thisCell = $(this);
var cellValue = parseInt(thisCell.text());
if (!isNaN(cellValue) && (cellValue <=3000)) {
thisCell.css("background-color","#FF0000");
}
});