کد دکمه ای برای خاموش و روشن کردن صفحه
<!-- DEION: This will make your background colors change upon buttonclick. INSTRUCTIONS: Place this in the HEAD tags of your webpage. Then place the button in your webpage. When someone clicks it, the webpage background colors will blink. To change the color of the blinking background, alter the color-hex tag in the "function blinkOn" section. This is the very first section of the Java. --> < LANGUAGE="Java"> //Modified by CoffeeCup Software //This code is Copyright (c) 1997 CoffeeCup Software //all rights reserved. License is granted to a single user to //reuse this code on a personal or business Web Site. function blinkOn(){ theWin.document.bgColor = "#000000" nTimes++ CCTimeOutID = window.setTimeout("blinkOff()",250); } function blinkOff(){ theWin.document.bgColor = "FFFFFF" if (nTimes < 5) CCTimeOutID = window.setTimeout("blinkOn()",250); else theWin.history.go(0) } function blinkCC(aWin) { nTimes = 0 theWin = aWin CCTimeOutID = window.setTimeout("blinkOn()",250); } </> <CENTER><FORM><INPUT TYPE="BUTTON" VALUE="On/Off Switch" onClick="blinkCC(self)"></FORM></CENTER>
کد رنگی کردن اسکرول بار
<STYLE>BODY { SCROLLBAR-FACE-COLOR: red; SCROLLBAR-HIGHLIGHT-COLOR: gray; SCROLLBAR-SHADOW-COLOR: black; SCROLLBAR-ARROW-COLOR: gray; SCROLLBAR-TRACK-COLOR: black; SCROLLBAR-DARKSHADOW-COLOR: red } </STYLE>
کد گذاشتن جستجو در سایت یا وبلاگ
< language=Java> var NS4 = (document.layers); var IE4 = (document.all); var win = window; var n = 0; function findInPage(str) { var txt, i, found; if (str == "") return false; if (NS4) { if (!win.find(str)) while(win.find(str, false, true)) n++; else n++; if (n == 0) alert("Not found."); } if (IE4) { txt = win.document.body.createTextRange(); for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) { txt.moveStart("character", 1); txt.moveEnd("textedit"); } if (found) { txt.moveStart("character", -1); txt.findText(str); txt.select(); txt.scrollIntoView(); n++; } else { if (n > 0) { n = 0; findInPage(str); } else alert("(( ببخشید... کلمه ای که نوشتی تو وبلاگ نیست)) "); } } return false; } </> <FORM name=search onsubmit="return findInPage(this.string.value);"> <P align=center><FONT size=3><INPUT style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid" onchange="n = 0;" size=11 name=string></FONT><BR><INPUT style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #aaaaaa" type=submit value=جستجو در وبلاگ ><center><font size=2pt;><font family=Times New Roman;><b><A title=persianblog href="java:if(confirm("http://www.msaeed.250free.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?"))window.location="http://www.msaeed.250free.com/"" tppabs="http://www.msaeed.250free.com/">Javas </A><BR> </P></FORM></DIV><BR><!-- /Search-->
کد گلباران در سایت
< language="Java1.2"> //Pre-load your image below! grphcs=new Array(6) Image0=new Image(); Image0.src=grphcs[0]="http://home.ripway.com/2004-5/117697/1.gif"; Image1=new Image(); Image1.src=grphcs[1]="http://home.ripway.com/2004-5/117697/2.gif" Image2=new Image(); Image2.src=grphcs[2]="http://home.ripway.com/2004-5/117697/3.gif" Image3=new Image(); Image3.src=grphcs[3]="http://home.ripway.com/2004-5/117697/4.gif" Image4=new Image(); Image4.src=grphcs[4]="http://home.ripway.com/2004-5/117697/5.gif" Image5=new Image(); Image5.src=grphcs[5]="http://home.ripway.com/2004-5/117697/6.gif" Amount=8; //Smoothness depends on image file size, the smaller the size the more you can use! Ypos=new Array(); Xpos=new Array(); Speed=new Array(); Step=new Array(); Cstep=new Array(); ns=(document.layers)?1:0; ns6=(document.getElementById&&!document.all)?1:0; if (ns){ for (i = 0; i < Amount; i++){ var P=Math.floor(Math.random()*grphcs.length); rndPic=grphcs[P]; document.write("<LAYER NAME="sn"+i+"" LEFT=0 TOP=0><img src="+rndPic+"></LAYER>"); } } else{ document.write("<div style="position:absolute;top:0px;left:0px"><div style="position:relative">"); for (i = 0; i < Amount; i++){ var P=Math.floor(Math.random()*grphcs.length); rndPic=grphcs[P]; document.write("<img id="si"+i+"" src=""+rndPic+"" style="position:absolute;top:0px;left:0px">"); } document.write("</div></div>"); } WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight; WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth; for (i=0; i < Amount; i++){ Ypos[i] = Math.round(Math.random()*WinHeight); Xpos[i] = Math.round(Math.random()*WinWidth); Speed[i]= Math.random()*5+3; Cstep[i]=0; Step[i]=Math.random()*0.1+0.05; } function fall(){ var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight; var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth; var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop; var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft; for (i=0; i < Amount; i++){ sy = Speed[i]*Math.sin(90*Math.PI/180); sx = Speed[i]*Math.cos(Cstep[i]); Ypos[i]+=sy; Xpos[i]+=sx; if (Ypos[i] > WinHeight){ Ypos[i]=-60; Xpos[i]=Math.round(Math.random()*WinWidth); Speed[i]=Math.random()*5+3; } if (ns){ document.layers["sn"+i].left=Xpos[i]; document.layers["sn"+i].top=Ypos[i]+hscrll; } else if (ns6){ document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]); document.getElementById("si"+i).style.top=Ypos[i]+hscrll; } else{ ("document.all.si"+i).style.left=Xpos[i]; ("document.all.si"+i).style.top=Ypos[i]+hscrll; } Cstep[i]+=Step[i]; } setTimeout("fall()",20); } window.onload=fall //--> </>
کد جستجوگر ام اس ان در سایت
<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 2</title> </head> <body> <table BORDER="0" WIDTH="222" HEIGHT="18"> <tr> <td WIDTH="214" HEIGHT="10"> <form NAME="search" ID="search" ACTION="http://search.msn.com/results.asp" METHOD="get"> <p><a HREF="java:if(confirm("http://www.msn.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?"))window.location="http://www.msn.com/"" tppabs="http://www.msn.com/"> <img SRC="splogo_min.gif.htm" tppabs="http://go.msn.com/AG/E/0.asp" width="61" height="33" BORDER="0" ALT="Go to msn.com"></a><font FACE="arial" SIZE="2"><strong>Search <font COLOR="#808080">the Web for:</font></strong></font><br> <input TYPE="text" ID="q" SIZE="18" MAXLENGTH="251" NAME="q" VCARD_NAME="SearchText"><input TYPE="submit" VALUE="Search" NAME="B1"><input TYPE="hidden" NAME="FORM" VALUE="FRNT"><input TYPE="hidden" NAME="un" VALUE="doc"><input TYPE="hidden" NAME="v" VALUE="1"></p> </form> </td> </tr> <tr> <td WIDTH="214" HEIGHT="21" VALIGN="bottom"> <p ALIGN="center"><font SIZE="1" FACE="arial"> <a HREF="java:if(confirm("http://search.msn.com/advanced.asp?MT=&RS=CHECKED&Form=FRNT \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?"))window.location="http://search.msn.com/advanced.asp?MT=&RS=CHECKED&Form=FRNT"" tppabs="http://search.msn.com/advanced.asp?MT=&RS=CHECKED&Form=FRNT">Use Advanced Search</a></font></td> </tr> </table> <p> </p> </body> </html> </body> </html>
.::مرجع کد آهنگ::. .::دریافت کد موزیک::.