<html> <body> <p> More Efficient Mouseover by using addEventListener. </p> <h1> <p id="para">Change Style by Mouse Over </p> </h1> <script> document.getElementById("para").addEventListener("mouseover", mouseOver); document.getElementById("para").addEventListener("mouseout", mouseOut); function mouseOver() { document.getElementById("para").style.color = "blue"; } function mouseOut() { document.getElementById("para").style.color ="black"; } </script> </body> </html>