Hi,
Get this code:
<html>
<head>
<title>Zoom-in, Zoom-out Image with javascript</title>
<script language="javascript">
function zoomin()
{
document.getElementById('i1').height = 574;
document.getElementById('i1').width = 410;
}
function zoomout()
{
document.getElementById('i1').height = 50;
document.getElementById('i1').width = 40;
}
</script>
</head>
<body>
<img src="yourImage.jpg" id="i1" height=50 width=40 onmouseover="zoomin();" onmouseout="zoomout()" />
<br />
<br />
<br />
<p>Or Try this</p>
<img src="yourImage.jpg" id="i1" height=50 width=40 onclick="zoomin();" onmouseout="zoomout()" />
</body>
</html>
Just try this simple code, it may helpful for you...!! :)
Mar 30, 2011