Previous | Home | Next |
javascript provide Image map to an easy way of linking various parts of an image without dividing the image into separate image files.and also Image maps are a popular way to provide navigation for a site
There are two types of image maps is used : client-side and server-side
client-side :
client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation.
server-side :
server-side extensions allow an application to communicate with a relational database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server.
The map is defined using the <map> </map> tag.
inserting an image
Syntax :
<img src="image.jpg" >
Example
<HTML> <HEAD> <script> function alertImage() { alert("r4r is a best deal services") } </script> </head> <body> <h3> click on image </h3> <A href="javascript:alertImage()"><IMG Src="imager4r.gif" ALT="here" Border=0 Height=200 Width= 200></A> </head> </body> </HTML>
Output :
when user click on this image, this message shows in popbox.
Previous | Home | Next |