Text Rollover



Write a javascript code for text rollover


<html>
    <body>
        
        <h4>Image Rollover</h4>

        <a onmouseover="document.fruit.src='Apple.jpg'">
        <h3> Apple </h3> </a>
        
        <a onmouseover="document.fruit.src='Pineapple.png'">

        <h3> Pineapple </h3> </a>
        
        <a> <img src="Apple.jpg" name="fruit"> </a>

  </body>
</html>

Output: