22 lines
443 B
HTML
22 lines
443 B
HTML
|
|
<br />
|
|
</body>
|
|
|
|
<script>
|
|
function colorerMots(element) {
|
|
const tds = document.querySelectorAll("td");
|
|
for (const td of tds) {
|
|
const text = td.textContent;
|
|
const motsACouleur = ["Error", "Failed", "COMPLETED"];
|
|
for (const mot of motsACouleur) {
|
|
text = text.replace(mot, `<span style="color: red; background-color: yellow;">${mot}</span>`);
|
|
}
|
|
td.textContent = text;
|
|
}
|
|
}
|
|
|
|
colorerMots(element);
|
|
|
|
</script>
|
|
</html>
|