TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
ZoomIn & ZoomOut of image on mouse over event
Ghanashyam Nayak
Apr 29, 2020
13.6
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
Using javascript function it will perform Zoom In & Zoom Out On Image
<html>
<head>
<title>Sample Code</title>
<script language=
'javascript'
>
function
zoomIn ()
{
document.getElementById(
'myImage'
).style.height=350;
document.getElementById(
'myImage'
).style.width=400;
}
function
zoomOut()
{
document.getElementById(
'myImage'
).style.height=100;
document.getElementById(
'myImage'
).style.width=150;
}
</script>
</head>
<body bgcolor=#00ff00 alink=blue vlink=blue>
<FORM name=
"windowEvent"
>
<img src=
"D:\551005.JPG"
name=
"myImage"
height=
"100"
width=
"150"
onmouseover=
'zoomIn ();'
onmouseout=
'zoomOut();'
> </img>
</FORM>
</body>
</html>
ZoomIn ZoomOut of image on mouse over event
Next Recommended Reading
Javascript-Open new Popup Window on button click event