About Java script

rohit007

rohit007

@rohit007-Vf88xJ Oct 27, 2024
😕
same one can send me a java script code for inlarge image on mouse over......

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • friendster7

    friendster7

    @friendster7-oVJr9h Apr 26, 2008

    can u explain more?
  • shalini_goel14

    shalini_goel14

    @shalini-goel14-ASmC2J Apr 27, 2008

    rohit007
    😕
    same one can send me a java script code for inlarge image on mouse over......
    Hi Rohit,
    Try the following simple code if it can solve your problem :


    <html>
     
    <head>
     
    <title>Image Testing in html</title>
     
    </head>
     
     
     
    <body>
     
    [img]C:/Documents and Settings/shalinig/Desktop/Temp/MusicTest/images/image003.jpg[/img]
     
    <BR/>
     
    Hello..it is image enlarge testing in html
     
     
     
    </body>
     
     
     
    </html>
     
     
     
    <SCRIPT>
     
    /* Method called on mouse over for increasing image's size,size(here 50) can be changed acc to your requirements */
     
    function enLargeImage(){
     
    var height=document.getElementById("imageId").height;
     
    var width=document.getElementById("imageId").width;
     
    document.getElementById("imageId").width=width+50;
     
    document.getElementById("imageId").height=height+50;
     
    }
     
     
     
    </SCRIPT>


    Thanks & regards
    Shalini
  • Sahithi Pallavi

    Sahithi Pallavi

    @sahithi-oJZaYj Mar 28, 2012

    The problem with this script is -
    1. The image enlarges every time on mouse over, so the size of the image keeps on increasing.
    2. It is not returning to its original size after the mouse out.