1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
| <html>
<head>
[...]
<script type="text/javascript">
function modifStyle() {
var i, j;
var allTRs = document.getElementsByTagName("tr");
var n = allTRs.length;
var msg = document.getElementById("msg");
j = 0;
for (i=0 ; i<n ; i++)
{
if ((allTRs[i].className.toLowerCase() == "even") || (allTRs[i].className.toLowerCase() == "odd"))
{
allTRs[i].childNodes[1].align = "center";
allTRs[i].childNodes[2].align = "center";
if (allTRs[i].childNodes[1].innerHTML != allTRs[i].childNodes[2].innerHTML)
{
allTRs[i].childNodes[0].style.backgroundColor = "#E72100";
allTRs[i].childNodes[0].style.fontWeight = "bold";
/*allTRs[i].childNodes[0].style.fontStyle = "italic";*/
allTRs[i].childNodes[1].style.backgroundColor = "#E72100";
allTRs[i].childNodes[1].style.fontWeight = "bold";
allTRs[i].childNodes[1].style.paddingRight = "5px";
allTRs[i].childNodes[1].align = "right";
allTRs[i].childNodes[2].style.backgroundColor = "#E72100";
allTRs[i].childNodes[2].style.fontWeight = "bold";
allTRs[i].childNodes[2].style.color = "white";
allTRs[i].childNodes[2].style.paddingLeft = "5px";
allTRs[i].childNodes[2].align = "left";
j++;
msg.innerHTML = "Il existe <font color='#E72100'>"+ j +" différence(s)</font> entre ces 2 fichiers.";
}
else
{
msg.innerHTML = "Ces 2 fichiers sont rigoureusement <font color='#008B00'><u>identiques</u></font>.";
}
msg.className = "info";
}
}
}
</script>
</head>
<body onload="modifStyle()">
[...]
<span id="msg"> </span>
[...]
</body>
</html> |
Partager