Copy Kan Kode berikut sebelum kode </html>
Text yang berwarna merah berikut ganti dengan gambar anda.
Contohnya Bisa dilihat di http://www.calvinalx.blogspot.com
/*
Image qui suit et regarde la souris
http://www.editeurjavascript.com/scripts/scripts_images_1_66.php
SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com
*/
var x = 0;
var y = 0;
if (document.getElementById)
{
if(navigator.appName.substring(0,3) == "Net")
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = Pos_Souris;
window.onload = Bouge_Image;
}
function Pos_Souris(e)
{
x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
}
posX = 0;
posY = 0;
anim = true;
oldpos = "http://i191.photobucket.com/albums/z75/masprim/kupu-kupu.gif";
function Bouge_Image()
{
if (document.getElementById && anim)
{
posX = posX+(((x-posX)+20)/15);
posY = posY+(((y-posY)+20)/15);
if(posX<x)
newpos='http://i191.photobucket.com/albums/z75/masprim/kupu-kupu.gif';
else
newpos='http://i191.photobucket.com/albums/z75/masprim/kupu-kupu.gif';
if(newpos!=oldpos)
{
document.tete.src=newpos;
oldpos=newpos;
}
document.getElementById("teteronde").style.top = posY+"px";
document.getElementById("teteronde").style.left = posX+"px";
tempo = setTimeout("Bouge_Image()", 15)
}
}
if(document.getElementById)
{
document.write('<div id="teteronde" style="position: absolute">');
document.write('<a href="#" onClick="anim=false;document.getElementById(\'teteronde\').style.visibility = \'hidden\';return(false)">');
document.write('<img src="http://i191.photobucket.com/albums/z75/masprim/kupu-kupu.gif" style="border:0px" name="tete" alt="Cliquez ici pour faire disparaître" />');
document.write('</a>');
document.write('</div>');
}
</script>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1479700-7";
urchinTracker();
</script>
Loading...
Posted by Calvin at 7/25/2008
Subscribe to:
Post Comments (Atom)
4 comments:
kok tidak mau ya... coba mas cek lagi kodenya.. trims..
Oh Kodenya gak bisa ya, kode tersebut hanya bisa berjalan pada browser yang mendukung java script.
Mas,, benar2 tidak bisa disave...
dan tertulis pesan eror, katanya..
Kami tidak dapat menyimpan template Anda.
Harap perbaiki kesalahan di bawah, dan kirimkan template Anda lagi.
Template Anda tidak dapat diparse karena tidak well-formed. Harap pastikan bahwa semua elemen XML ditutup dengan benar.
Pesan error XML: The entity name must immediately follow the '&' in the entity reference.
Tolong bagaimana cara mengatasi masalah ini.. dan browserku sudah mendukung java script (mozilla firefox)
ya...
Post a Comment