Tryit Editor v1.4

<html> <head> <script type="text/javascript"> function changeText() { document.getElementById("p1").style.color="blue"; document.getElementById("p1").style.fontSize="larger"; document.getElementById("p1").innerHTML="Hello world!"; } function restoreText() { document.getElementById("p1").style.color="black"; document.getElementById("p1").style.fontSize="medium"; document.getElementById("p1").innerHTML="Mouseover this text to change it"; } </script> </head> <body> <p id="p1" onmouseover="changeText()" onmouseout="restoreText()">Mouseover this text to change it</p> </body> </html> | Your Result:
Edit the code above and click to see the result. | W3Schools.com - Try it yourself