Any html expert please refer me the code how to make a clickable image which after the click image will be enlarged. thank you.

Recommended Answers

All 2 Replies

Here is the javascript which will swap the image so check out and try it. It will surely help you

<HTML>
<HEAD>
<SCRIPT LANGUAGE=JavaScript>
intImage = 2;
function swapImage() {
switch (intImage) {
case 1:
IMG1.src = "linktoimage"
intImage = 2
return(false);
case 2:
IMG1.src = "linktoimage"
intImage = 1
return(false);
}
}
</SCRIPT>
</HEAD>
<BODY>
<IMG id="IMG1" name="IMG1" src="image which you want in intial stage"
onclick="swapImage();">
</BODY>
</HTML>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.