0
我使用javascript for SharePoint根據http://techtrainingnotes.blogspot.com提供的信息。問題是這是爲一個SharePoint列表列設計的,我需要它爲七列工作。我假設做這個工作我需要colDueDate一個數組。有人可以幫忙嗎?將數組傳遞給childNode
<script type="text/javascript" language="javascript">
var colDueDate = 3;//single column
var i=0;
d=new Date(); //current date/time
var x = document.getElementsByTagName("TD") // find all of the TDs
for (i=0;i<x.length;i++)
{
if (x[i].className=="ms-vb2") //find the TDs styled for lists
{
if (Date.parse(x[i].parentNode.childNodes[colDueDate].childNodes[0].innerHTML)<d.getTime())
{
x[i].parentNode.childNodes[colDueDate].style.backgroundColor='red'; // set the color
}
}
}
</script>
使用你的建議,極大的幫助讓我在正確的方向。對於(j = 0; j
user3561365