Ici on surligne la div maj (id= »maj ») en rouge en 3 seconde
<script> function highlight() { var el = document.getElementById('maj'); var original = el.style.backgroundColor ; el.style.backgroundColor ='red'; window.setTimeout(function() { el.style.backgroundColor = original; }, 3000); } highlight(); </script>