日期:2014-05-16 浏览次数:20465 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <div class='view view-case-view-all'> <div class='view-content view-content-case-view-all'> <table border="1"> <tr class="odd"> <td class="view-field view-field-node-title">任务测试1</td> <td class="view-field view-field-workflow-states-state">执行中</td> </tr> <tr class="even"> <td class="view-field view-field-node-title">任务测试2</td> <td class="view-field view-field-workflow-states-state">完成</td> </tr> <tr class="even"> <td class="view-field view-field-node-title">任务测试3</td> <td class="view-field view-field-workflow-states-state">执行中</td> </tr> </table> </div> </div> <script language='javascript'> function setClor() { var tdArray = document.getElementsByTagName("td"); for(var i=0;i<tdArray.length;i++) { with(tdArray[i]){ if(innerText == "完成"){ parentNode.bgColor = "red"; } } } } setClor(); </script> </BODY> </HTML>