Indonesia
<!-- http://www.downcodes.com --> <!-- bbs http://bbs.downcodes.com --> <!--1、将以下代码加入到HEML的<head>< /head>之间:--> <script LANGUAGE="JavaScript"><!-- langkah = 0; obj = Gambar baru(); function anim(xp,xk,smer) //smer = arah { obj.style.left = x; x += langkah*smer; if (x>=(xk+xp)/2) { if (smer == 1) langkah--; langkah lain++; } else { if (smer == 1) langkah++; langkah lain--; } jika (x >= xk) { x = xk; lebih kecil = -1; } jika (x <= xp) { x = xp; lebih kecil = 1; } // jika (smer > 2) smer = 3; setTimeout('anim('+xp+','+xk+','+smer+')', 50); } fungsi moveLR(objID,movingarea_width,c) { if (navigator.appName=="Netscape") window_width = window.innerWidth; lain window_width = dokumen.body.offsetWidth; obj = dokumen.gambar[objID]; image_width = obj.lebar; x1 = obj.style.kiri; x = Angka(x1.substring(0,x1.panjang-2)); // 30px -> 30 if (c == 0) { if (movingarea_width == 0) { right_margin = window_width - image_width; anim(x,margin_kanan,1); } else { margin_kanan = x + lebar_area bergerak - lebar_gambar; if (movingarea_width < x + image_width) window.alert("Tidak ada ruang untuk bergerak!"); lain anim(x,margin_kanan,1); } } else { if (lebar_area bergerak == 0) margin_kanan = lebar_jendela - lebar_gambar; else { x = Math.round((window_width-movingarea_width)/2); margin_kanan = Matematika.bulat((lebar_jendela+lebar_area bergerak)/2)-lebar_gambar; } animasi(x,margin_kanan,1); } } //--></script> <!--2、将以下代码加入到HEML的<body></body>之间:--> <img src="/u/info_img/2009-06 /20/2809_logo.gif" name="gambar" style="posisi: absolut; atas: 70 piksel; kiri: 30 piksel;" BORDER="0" WIDTH="140" HEIGHT="40"> <skrip LANGUAGE="JavaScript"><!-- setTimeout("moveLR('gambar',300,1)",10); //--></skrip>