我有一个问题。我使用SharePoint 2010,并尝试着色列表中的特定元素。但是这些更改只应用于列。所以我必须搜索此列,然后它应该使用JavaScript的CSS样式。我不想使用SharePoint Designer。 这是我的JavaScript ......错误在哪里?到现在为止它还没有工作。 我希望你能帮助我!
$(document).ready(function () {
$("#diidSortCR_x0020_Status").val() == "CR Status") {
$("td").filter(function () {
return $(this).text() == 'Evaluated';
}).css("background-color", "FF0000");
$("td.ms-vb2").filter(function () {
return $(this).text() == 'Approved';
}).css("background-color", "00FF00");
$("td").filter(function () {
return $(this).text() == 'Ready to test';
}).css("background-color", "D4D4D4");
});