rohit007
rohit007
Branch Unspecified
29 Mar 2012

About Java script

😕
same one can send me a java script code for inlarge image on mouse over......
friendster7

friendster7

Branch Unspecified
10 years ago
can u explain more?
shalini_goel14

shalini_goel14

Branch Unspecified
10 years ago
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

Computer Science
6 years ago
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.

Share this content on your social channels -

Only logged in users can reply.