Witam postanowiłem zrobić taki mały spis fajnych skryptów które przydadzą się na bloga lub stronę.
Statystyki Roku:
<script type="text/javascript" src="http://dodatki.net/pliki/dni.php"></script>
Najbliższe święta:
<script type="text/javascript" src="http://dodatki.net/swieta.php"></script>
Losowy żart:
<script type = "text/javascript" src = "http://www.deszczowce.pl/skrypty/losowy_zart.php"></script>
Losowa ciekawostka:
<script type = "text/javascript" src = "http://www.deszczowce.pl/skrypty/losowa_ciekawostka.php"></script>
Adres IP:
<script type="text/javascript" src="http://dodatki.net/pliki/ip.php"></script>
Hasło na stronę WWW:
<script language="JavaScript"> <!-- var password = prompt("Dostęp do strony ograniczony! Podaj hasło.","Tu wpisz Chasło"); if (password == "TWOJEhasło") { alert("Hasło poprawne! Witaj na mojej stronie WWW !"); } else { alert("Błędne hasło! Spróbuj ponownie."); javascript:history.back() } --> </script>
Blokada PPM:
<script language=JavaScript> <!-- var message="Opcja nie dostępna"; /////////////////////////////////// function clickIE() {if (document.all) {alert(message);return false;}} function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) { if (e.which==2||e.which==3) {alert(message);return false;}}} if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} // --> </script>
Losowy element:
<script type="text/javascript"> // <![CDATA[ Array.prototype.random = function(limit) { if (typeof limit == 'undefined' || limit < 0) limit = 1; else if (!limit) limit = this.length; for (var i = 0, source = this, target = new Array(), n = source.length; i < limit && n > 0; i++) { do { var index = Math.random(); } while (index == 1); index = Math.floor(index * n); target.push(source[index]); source[index] = source[--n]; } return target; } document.write(new Array( // Tu wpisz kolejne elementy: 'Tekst 1', 'Tekst 2', 'Tekst 3' ).random().join('')); // ]]> </script>
Ruszający się tekst w pasku nazwy:
<script language="javascript" type="text/javascript"> <!-- var T = "OPIS"; var s = 0; var sT = null; function A() { s++; if (s > 24) { s = 1;} if (s == 1) { document.title = '|.:: NAPIS ::::::::::::::.| '+T+' '; } if (s == 2) { document.title = '|.::: NAPIS :::::::::::::.| '+T+' '; } if (s == 3) { document.title = '|.:::: NAPIS ::::::::::::.| '+T+' '; } if (s == 4) { document.title = '|.::::: NAPIS :::::::::::.| '+T+' '; } if (s == 5) { document.title = '|.::::: NAPIS :::::::::::.| '+T+' '; } if (s == 6) { document.title = '|.:::::: NAPIS ::::::::::.| '+T+' '; } if (s == 7) { document.title = '|.::::::: NAPIS :::::::::.| '+T+' '; } if (s == 8) { document.title = '|.:::::::: NAPIS ::::::::.| '+T+' '; } if (s == 9) { document.title = '|.::::::::: NAPIS :::::::.| '+T+' '; } if (s == 10) { document.title = '|.:::::::::: NAPIS ::::::.| '+T+' '; } if (s == 11) { document.title = '|.::::::::::: NAPIS :::::.| '+T+' '; } if (s == 12) { document.title = '|.:::::::::::: NAPIS ::::.| '+T+' '; } if (s == 13) { document.title = '|.::::::::::::: NAPIS :::.| '+T+' '; } if (s == 14) { document.title = '|.:::::::::::::: NAPIS ::.| '+T+' '; } if (s == 15) { document.title = '|.::::::::::::: NAPIS :::.| '+T+' '; } if (s == 16) { document.title = '|.:::::::::::: NAPIS ::::.| '+T+' '; } if (s == 17) { document.title = '|.::::::::::: NAPIS :::::.| '+T+' '; } if (s == 18) { document.title = '|.:::::::::: NAPIS ::::::.| '+T+' '; } if (s == 19) { document.title = '|.::::::::: NAPIS :::::::.| '+T+' '; } if (s == 20) { document.title = '|.::::::: NAPIS :::::::::.| '+T+' '; } if (s == 21) { document.title = '|.:::::: NAPIS ::::::::::.| '+T+' '; } if (s == 21) { document.title = '|.::::: NAPIS :::::::::::.| '+T+' '; } if (s == 22) { document.title = '|.:::: NAPIS ::::::::::::.| '+T+' '; } if (s == 23) { document.title = '|.::: NAPIS :::::::::::::.| '+T+' '; } if (s == 24) { document.title = '|.:: NAPIS ::::::::::::::.| '+T+' '; } sT = setTimeout("A()", 150); } A(); //--> </script>
Falujący tekst (1.2):
<body><script language="JavaScript1.2"> /* Nudging text by Matthias (info@freejavascripts.f2s.com) Modified by Dynamic Drive to function in NS6 For this script and more, visit http://www.dynamicdrive.com */ //configure message message="TU WPISZ TEKST" //animate text in NS6? (0 will turn it off) ns6switch=1 var ns6=document.getElementById&&!document.all mes=new Array(); mes[0]=-1; mes[1]=-4; mes[2]=-7;mes[3]=-10; mes[4]=-7; mes[5]=-4; mes[6]=-1; num=0; num2=0; txt=""; function jump0(){ if (ns6&&!ns6switch){ jump.innerHTML=message return } if(message.length > 6){ for(i=0; i != message.length;i++){ txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"}; jump.innerHTML=txt; txt=""; jump1a() } else{ alert("Your message is to short") } } function jump1a(){ nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0 nfinal.style.left=-num2; if(num2 != 9){ num2=num2+3; setTimeout("jump1a()",50) } else{ jump1b() } } function jump1b(){ nfinal.style.left=-num2; if(num2 != 0){num2=num2-3; setTimeout("jump1b()",50) } else{ jump2() } } function jump2(){ txt=""; for(i=0;i != message.length;i++){ if(i+num > -1 && i+num < 7){ txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>" } else{txt=txt+"<span>"+message.charAt(i)+"</span>"} } jump.innerHTML=txt; txt=""; if(num != (-message.length)){ num--; setTimeout("jump2()",50)} else{num=0; setTimeout("jump0()",50)}} </script> </head> <body> <h2><div id="jumpx" style="color:blue"></div></h2> <script> if (document.all||document.getElementById){ jump=(document.getElementById)? document.getElementById("jumpx") : document.all.jumpx jump0() } else document.write(message) </script>
Falujący tekst (zaawansowany):
<script> function HexArray(n){this.length=n;for(i=0;i<10;i++) this[i]=i;this[10] ="A";this[11]="B";this[12]="C";this[13]="D";this[14]="E";this[15] ="F";return(this)};hex=new HexArray();function DezToHex(x){var high=Math.floor(x/16);var low=Math.floor(x-high*16);return(hex[high]+""+hex [low])};function usercolortext (text,start_red,start_green,start_blue,end_red,end_green,end_blue){for (i=0;i<text.length;i++){cjred=start_red-i*(start_red-end_red)/(text.length- 1);cjgreen=start_green-i*(start_green-end_green)/(text.length- 1);cjblue=start_blue-i*(start_blue-end_blue)/(text.length-1);document.write ("<FONT COLOR='#"+DezToHex(cjred)+DezToHex(cjgreen)+DezToHex(cjblue) +"'>"+text.substring(i,i+1)+"</FONT>")}} function begmtxt(text,start_red,start_green,start_blue,end_red,end_green,end_blue) { cr=new Array(); cg=new Array(); cb=new Array(); c=0; t=text; l=text.length; for(j=0;j<l+1;j++) { cr[j]=start_red-j*(start_red-end_red)/(l-1); cg[j]=start_green-j*(start_green-end_green)/(l-1); cb[j]=start_blue-j*(start_blue-end_blue)/(l-1); } for(j=0;j<l+1;j++) { cr[j+l]=cr[l-j]; cg[j+l]=cg[l-j]; cb[j+l]=cb[l-j]; } animate(); } function animate() { tn=""; for(i=0;i<l+1;i++) { cjred=cr[Math.abs(c-i)]; cjgreen=cg[Math.abs(c-i)]; cjblue=cb[Math.abs(c-i)]; tn=tn+"<FONT COLOR='#"+DezToHex(cjred)+DezToHex(cjgreen)+DezToHex (cjblue)+"'>"+t.substring(i,i+1)+"</FONT>"; } if (document.layers) {document.boc.document.writeln(tn);document.boc.document.close();} else {document.all.boc.innerHTML=tn;} if(c==l*2){c=0}else{c=c+1}; setTimeout('animate()',0); } </script> <body onLoad="begmtxt('TWOJ TEKST TEKST TEKST',0,0,0,255,255,255)"> <div id="boc" style="font-size:25px; font-weight:bold"> </div> </body>
Zmniejszający/Powiększający się obrazek:
<script language="JavaScript1.2"> var zoomfactor=0.05 //Enter factor (0.05=5%) function zoomhelper(){ if (parseInt(whatcache.style.width)>10&&parseInt(whatcache.style.height)>10){ whatcache.style.width=parseInt(whatcache.style.width)+parseInt(whatcache.style.width)*zoomfactor*prefix whatcache.style.height=parseInt(whatcache.style.height)+parseInt(whatcache.style.height)*zoomfactor*prefix } } function zoom(originalW, originalH, what, state){ if (!document.all&&!document.getElementById) return whatcache=eval("document.images."+what) prefix=(state=="in")? 1 : -1 if (whatcache.style.width==""||state=="restore"){ whatcache.style.width=originalW whatcache.style.height=originalH if (state=="restore") return } else{ zoomhelper() } beginzoom=setInterval("zoomhelper()",100) } function clearzoom(){ if (window.beginzoom) clearInterval(beginzoom) } </script> </head> <body> <!-- CHANGE XXX to your image width, XXX to image height, and "myimage" to your image's name--> <a href="#" onmouseover="zoom(99,100,'myimage','in')" onmouseout="clearzoom()">Zoom In</a> | <a href="#" onmouseover="zoom(XXX,XXX,'myimage','restore')">Normal</a> | <a href="#" onmouseover="zoom(120,60,'myimage','out')" onmouseout="clearzoom()">Zoom Out</a> <div style="position:relative;width:XXX;height:XXX"><div style="position:absolute"> <img name="myimage" src="LINK DO OBRAZKA"> </div></div>
Mam nadzieje że pomogłem liczę na +!
Offline