PROGRAM TO SWAP IMAGES(JAVASCRIPT-SUPPORTED IN IE BROWSER)

 swap.html

<html>

<head>

<script language="javascript">

var p1='C:/kk1/white.png';

var p2='C:/kk1/black.png';

function movein (image1, image2) {

 window.document.picture1.src = image1;

 window.document.picture2.src = image2;

 }

</script>

</head>

<body>

<a href="" onMouseOver="movein(p2,p1);" onClick="return false;" onMouseOut="movein(p1,p2);">

<img src=p1 name="picture1" height="300" >

 </a>

<a href="" onMouseOver="movein(p1,p2);" onClick="return false;" onMouseOut="movein(p2,p1);">

<img src=p2  name="picture2" height="300" > 

</a>

</body>

</html>

OUTPUT:

BEFORE SWAP






AFTER SWAP



No comments:

Post a Comment