Translate it
|
Adding Rollover Image
Thursday, 10 July 2008
1.If your Image is in your computer hard drive, firstly you have to upload your image onto the internet.
2.Insert the script below right before the tag </head>
<script type="text/JavaScript"> /*-----------00------------------------- Please keep this author signature still remains Designer: sangdedi Homepage: http://sangdedi.blogspot.com -------------00-------------------------*/ <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; }
function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} }
function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length; i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; }
function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script>
|
3.Copy this script below :
onload="MM_preloadImages(‘http://swapimage.jpg’)"
|
and insert it into the <body INSERT HERE > tag. So your script from <body> will become
<body onload="MM_preloadImages(‘http://swapimage.jpg’)">
|
4.Final step is copy this script below and paste it where ever you want the rollover image to appear.
<a href="http://sangdedi.blogspot.com" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('image','','http://swapimage.jpg,1)"> <img src="http://realimage.jpg" name="rolloverimg" width="23" height="23" border="0" id="Image35" /></a>
|
P.S: Change the URL of the image with your own.Labels: Added Items
|
add link,submit link
directory indonesia
Submit Links Directory
Submit link
Tamrin
Rizky May
Lutfi Rifai
Lushtea
Oglatansa
Ganis Zulfa Santoso
| |