zoomin/zoomout image in JavaScript

By Super Man

zoom in and zoom out image in JavaScript

How to: zoomin/zoomout image in JavaScript

function zoomin()
{
   document.getElementById('i1').height = 400;
   document.getElementById('i1').width = 400;
}

function zoomout()
{
    document.getElementById('i1').height = 100;
    document.getElementById('i1').width = 100;
}

 <img src="H.GIF" id="i1" height=100 width=100 onmouseover="zoomin();" onmouseout="zoomout()" />

On mouse over and out calls zoomin and zoomout function respectively.

It will set its height and width.

zoomin/zoomout image in JavaScript  (826 Views)
Create New Account