All post

Sabtu, 29 November 2008

Membuat link berkelap kelip/rainbow

Ini salah satu script untuk mempercantik blog.. Kl mouse berada di link, link akan berubah2 warna.. Copy scrpt berikut lalu simpan dalam format nama rainbow.js.Lalu upload ke hosting km.. Letakan lettakan

'<script src="alamat rainbow.js"></script>'
pada body html,.

/************************************************************************/ /* Rainbow Links Version 1.03 (2003.9.20) */ /* Script updated by Dynamicdrive.com for IE6 */ /* Copyright (C) 1999-2001 TAKANASHI Mizuki */ /* takanasi@hamal.freemail.ne.jp */ /*----------------------------------------------------------------------*/ /* Read it somehow even if my English text is a little wrong! ;-) */ /* */ /* Usage: */ /* Insert '<script src="rainbow.js"></script>' into the BODY section, */ /* right after the BODY tag itself, before anything else. */ /* You don't need to add "onMouseover" and "onMouseout" attributes!! */ /* */ /* If you'd like to add effect to other texts(not link texts), then */ /* add 'onmouseover="doRainbow(this);"' and */ /* 'onmouseout="stopRainbow();"' to the target tags. */ /* */ /* This Script works with IE4,Netscape6,Mozilla browser and above only, */ /* but no error occurs on other browsers. */ /************************************************************************/ //////////////////////////////////////////////////////////////////// // Setting var rate = 20; // Increase amount(The degree of the transmutation) //////////////////////////////////////////////////////////////////// // Main routine if (document.getElementById) window.onerror=new Function("return true") var objActive; // The object which event occured in var act = 0; // Flag during the action var elmH = 0; // Hue var elmS = 128; // Saturation var elmV = 255; // Value var clrOrg; // A color before the change var TimerID; // Timer ID if (document.all) { document.onmouseover = doRainbowAnchor; document.onmouseout = stopRainbowAnchor; } else if (document.getElementById) { document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT); document.onmouseover = Mozilla_doRainbowAnchor; document.onmouseout = Mozilla_stopRainbowAnchor; } //============================================================================= // doRainbow // This function begins to change a color. //============================================================================= function doRainbow(obj) { if (act == 0) { act = 1; if (obj) objActive = obj; else objActive = event.srcElement; clrOrg = objActive.style.color; TimerID = setInterval("ChangeColor()",100); } } //============================================================================= // stopRainbow // This function stops to change a color. //============================================================================= function stopRainbow() { if (act) { objActive.style.color = clrOrg; clearInterval(TimerID); act = 0; } } //============================================================================= // doRainbowAnchor // This function begins to change a color. (of a anchor, automatically) //============================================================================= function doRainbowAnchor() { if (act == 0) { var obj = event.srcElement; while (obj.tagName != 'A' && obj.tagName != 'BODY') { obj = obj.parentElement; if (obj.tagName == 'A' || obj.tagName == 'BODY') break; } if (obj.tagName == 'A' && obj.href != '') { objActive = obj; act = 1; clrOrg = objActive.style.color; TimerID = setInterval("ChangeColor()",100); } } } //============================================================================= // stopRainbowAnchor // This function stops to change a color. (of a anchor, automatically) //============================================================================= function stopRainbowAnchor() { if (act) { if (objActive.tagName == 'A') { objActive.style.color = clrOrg; clearInterval(TimerID); act = 0; } } } //============================================================================= // Mozilla_doRainbowAnchor(for Netscape6 and Mozilla browser) // This function begins to change a color. (of a anchor, automatically) //============================================================================= function Mozilla_doRainbowAnchor(e) { if (act == 0) { obj = e.target; while (obj.nodeName != 'A' && obj.nodeName != 'BODY') { obj = obj.parentNode; if (obj.nodeName == 'A' || obj.nodeName == 'BODY') break; } if (obj.nodeName == 'A' && obj.href != '') { objActive = obj; act = 1; clrOrg = obj.style.color; TimerID = setInterval("ChangeColor()",100); } } } //============================================================================= // Mozilla_stopRainbowAnchor(for Netscape6 and Mozilla browser) // This function stops to change a color. (of a anchor, automatically) //============================================================================= function Mozilla_stopRainbowAnchor(e) { if (act) { if (objActive.nodeName == 'A') { objActive.style.color = clrOrg; clearInterval(TimerID); act = 0; } } } //============================================================================= // Change Color // This function changes a color actually. //============================================================================= function ChangeColor() { objActive.style.color = makeColor(); } //============================================================================= // makeColor // This function makes rainbow colors. //============================================================================= function makeColor() { // Don't you think Color Gamut to look like Rainbow? // HSVtoRGB if (elmS == 0) { elmR = elmV; elmG = elmV; elmB = elmV; } else { t1 = elmV; t2 = (255 - elmS) * elmV / 255; t3 = elmH % 60; t3 = (t1 - t2) * t3 / 60; if (elmH < 60) { elmR = t1; elmB = t2; elmG = t2 + t3; } else if (elmH < 120) { elmG = t1; elmB = t2; elmR = t1 - t3; } else if (elmH < 180) { elmG = t1; elmR = t2; elmB = t2 + t3; } else if (elmH < 240) { elmB = t1; elmR = t2; elmG = t1 - t3; } else if (elmH < 300) { elmB = t1; elmG = t2; elmR = t2 + t3; } else if (elmH < 360) { elmR = t1; elmG = t2; elmB = t1 - t3; } else { elmR = 0; elmG = 0; elmB = 0; } } elmR = Math.floor(elmR).toString(16); elmG = Math.floor(elmG).toString(16); elmB = Math.floor(elmB).toString(16); if (elmR.length == 1) elmR = "0" + elmR; if (elmG.length == 1) elmG = "0" + elmG; if (elmB.length == 1) elmB = "0" + elmB; elmH = elmH + rate; if (elmH >= 360) elmH = 0; return '#' + elmR + elmG + elmB; }

selanjutnya...

Kamis, 27 November 2008

Shake window

Jika mengeklik kanan bisa gempa Letakan cript berikut pada body <SCRIPT language=JavaScript> <!--inizio-----mess per copiare document.onmousedown=click function click() { times2=0 if ((event.button==2) || (event.button==3)) { alert("Jangan klik kanan !!"); shake(20) } } function shake(n) { if (parent.moveBy) { for (i = 20; i > 0; i--) { for (j = n; j > 0; j--) { parent.moveBy(0,i); parent.moveBy(i,0); parent.moveBy(0,-i); parent.moveBy(-i,0); } } } } //fine copia--> </SCRIPT>

selanjutnya...

Kamis, 20 November 2008

Membuat gambar Gambar yang mengikuti scroll mouse..

Berikut ini adalah cara yg jitu buat beriklan ria.. Karena dengan script ini gambar akan mengikuti cursor kemanapun dia pergi,jadi kayak anak ayam yang enggak mau ketinggalan induknya <html> <head> <script> if (!document.layers) document.write('<div id="divStayTopright" style="position:absolute">') </script> </head> <body> <layer id="divStayTopright"> <!--EDIT BELOW CODE TO YOUR OWN MENU--> <table border="0" width="130" cellspacing="0" cellpadding="0"> <tr> <td><img src="http://kendhin.890m.com/soniclari.gif"></td> </tr> </table> <!--END OF EDIT--> </layer> <script type="text/javascript"> /* Floating Menu script- Roy Whittle (http://www.javascript-fx.com/) Script featured on/available at http://www.dynamicdrive.com/ This notice must stay intact for use */ //Enter "frombottom" or "fromtop" var verticalpos="fromtop" if (!document.layers) document.write('</div>') function JSFX_FloatTopDiv() { var startX = 0, startY = 0; var ns = (navigator.appName.indexOf("Netscape") != -1); var d = document; function ml(id) { var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id]; if(d.layers)el.style=el; el.sP=function(x,y){this.style.right=x;this.style.top=y;}; el.x = startX; if (verticalpos=="fromtop") el.y = startY; else{ el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight; el.y -= startY; } return el; } window.stayTopright=function() { if (verticalpos=="fromtop"){ var pY = ns ? pageYOffset : document.body.scrollTop; ftlObj.y += (pY + startY - ftlObj.y)/8; } else{ var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight; ftlObj.y += (pY - startY - ftlObj.y)/8; } ftlObj.sP(ftlObj.x, ftlObj.y); setTimeout("stayTopright()", 10); } ftlObj = ml("divStayTopright"); stayTopright(); } JSFX_FloatTopDiv(); </script> </body> </html>

selanjutnya...

Selasa, 18 November 2008

Menubah script agar tidak di terjemahkan dalam postingan

Jika kita mau posting sebuah code script pasti akan kesusahan jika kita letakan code scipt di dalam posting begitu aja.. Tentu ada cara supaya script tersebut tidak berjalan dalam perintahnya dan menjadi teks biasa Mungkin ini bisa membantu yg pertama yaitu menggunakan textarea.. Dengan textarea script akan muncul sebagai text <form> <textarea rows="6" cols="20"> letakan code script disini</textarea> </form> Cara laen yaitu mengubah code2 yang membuat script berjalan dalam postingan yaitu contoh, jika kita menuliskan kode <body> karena bila di tulis biasa didalam postingan akan berjalan atau diterjemahkan kedalam bahasa HTML.jadi harus mengganti code2 dengan code pengganti <body>, maka harus ditulis dalam postingan yaitu seperti ini &lt;body&gt;. Berikut adalah Code pengganti script

Kode
Kode Pengganti
<
&lt;
>
&gt;
"
&quot;
Atau gunakan convert html centricle.com dibawah ini

Encode / Decode HTML Entities

Link sumber: trik-tips.blogspot.com

selanjutnya...

Senin, 17 November 2008

Script kembang api

membuat script kembang api Sebaikny diasang pada sidebar blog, seperti biasanya dengan langkah sebagai berikut. * Masuk ke http://blogger.com hingga memasuki Panel Kontrol * Klik Tata Letak (layout) * Kemudian Tambahkan Gadget * Kemudian Tambahkan HTML/Javascript * Kemudian letakan script di bawah <script src=" http://h1.ripway.co m/marine/efekkembangapi.js" type="text/javascript"> /*************************** ******************** * Script featured & available at Dynamic Drive at http://www.dynamicdrive.com/ * Please keep this notice intact **************************** *******************/ </script> * lalu Simpan * lalu lihat blog anda Link sumber: yasin-marnie.blogspot.com

selanjutnya...

Script burung terbang

Script burung terbang Caranya seperti berikut ini. Tempatkan script di bawah pada sidebar blog Anda,dengan langkah-langkah sebagai berikut. * Login ke http://blogger.com hingga masuk Panel Kontrol * Klik Tata Letak (layout) * Klik Tambah Gadget * Tambahkan HTML/Javascript * Paste script seperti ini <script language="JavaScript1.2" src="http://h1.ripway.com/mari ne/burung.js"> /*************************** ******************** *Script featured & available at Dynamic Drive at http://www.dynamicdrive.com/ *Please keep this notice intact **************************** *******************/ </script> * Kemudian Simpan * lalu liat di blog anda

selanjutnya...

Bikin salju warna warni di blog

Mau blog kamu di penuhi salju apa lagi saljunya warna warni caranya : 1. Login ke Blogger 2. Lalu pilih Layout/Tata Letak -- > Edit HTML 3. Cari Kode Kalo dah Ketemu CopyPaste kode/Script efek salju di bawahnya, Merah

<script src='http://h1.ripway.co m/marine/script/saljumerah.js' type='text/javascript'></script>
Kuning
<script src='http://h1.ripway.co m/marine/script/saljukuning.js' type='text/javascript'></script>
Ungu
<script src='http://h1.ripway.co m/marine/script/saljuungu.js' type='text/javascript'></script>
Biru Tua
<script src='http://h1.ripway.co m/marine/script/saljubiru.js' type='text/javascript'></script>
Biru Muda
<script src='http://agungosx.go oglepages.com/saljubirumuda.js' type='text/javascript'></script>
Pink
<script src='http://h1.ripway.com/marine/script/pinksalju.js' type='text/javascript'></script>
Coklat
<script src='http://h1.ripway.co m/marine/script/saljucoklat.js' type='text/javascript'></script>
Hijau Muda
<script src='http://h1.ripway.co m/marine/script/greensalju.js' type='text/javascript'></script>
Hijau Tua
<script src='http://h1.ripway.co m/marine/script/saljuijotua.js' type='text/javascript'></script>
Putih
<script src='http://h1.ripway.co m/marine/script/saljuputih.js' type='text/javascript'></script>
Hitam
<script src='http://h1.ripway.co m/marine/script/saljuhitam.js' type='text/javascript'></script>
Tapi jika meletakan lebih dari 1script hanya akan menampilkan 1 warna saja yaitu script yang paling atas saja. Link sumber: http//yasin-marine.blogspot.com

selanjutnya...