• Archives

  • Changing the image on hovering through javascript

    By admin | January 8, 2008

    This tutorial is going to teach you how to change the image when you hover your mouse over it throught javascript:

    Have a look below:

    <html>
    <head>
    <script type=”text/javascript”>
    function onhover()
    {
    document.imagel.src=”image1.gif”;
    }
    function hoverout()
    {
    document.imagel.src=”image2.gif”;
    }
    </script>
    </head>

    <body>
    <a href=”http://www.easytutorial.info” target=”_blank”>
    <img border=”0″ alt=”Easytutorials for you” src=”image1.gif” name=”imagel” height=”20″ onmouseover=”onhover()” onmouseout=”hoverout()” /></a>
    </body>
    </html>

    Thanks
    krates

    Topics: Javascript | Comments Off on Changing the image on hovering through javascript

    Related Links: