Drop Down
يک منو بسيار زيبا
<!-- START OF Drop Down DHTML --> <!-- SUMMARY BRIEFS This DHTML script will create a drop down link box out of an ordinary link. VERY COOL!!!! The top portion of this script goes above the <BODY> tag. The second portion goes where you want the drop down link box to be. --> <style> <!-- #wrapper{ position:relative; height:30px } #wrapper2{ position:absolute } #coffeemenu03{ filter:revealTrans(Duration=1.5,Transition=12) visibility:hide } --> </style></HEAD> <BODY> <ilayer id="coffeemenu01" height=35px> <layer id="coffeemenu02" visibility=show> <span id="wrapper"> <span id="wrapper2" onClick="dropit2();event.cancelBubble=true;return false"> <font face="Verdana"><b><a href="notthisbrowser.html">Click Here To Navigate</a></b></font> </span> </span> </layer> </ilayer> <script language="JavaScript1.2"> var enableeffect=true var selection=new Array() selection[0]='<font face="ARIAL BLACK"><a href="http://www.IRANSUNS.com">About Us</a><br>' selection[1]='<a href="http://www.IRANSUNS.com">Free E-mail</a><br>' selection[2]='<a href="http://www.IRANSUNS.com">Learning</a><br>' selection[3]='<a href="http://www.IRANSUNS.com">Download Center</a><br>' selection[4]='<a href="http://www.IRANSUNS.com">Hosting</a><br></font>' if (document.layers) document.coffeemenu01.document.coffeemenu02.visibility='show' function dropit2(){ if (document.all){ coffeemenu03.style.left=document.body.scrollLeft+event.clientX-event.offsetX coffeemenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+18 if (coffeemenu03.style.visibility=="hidden"){ if (enableeffect) coffeemenu03.filters.revealTrans.apply() coffeemenu03.style.visibility="visible" if (enableeffect) coffeemenu03.filters.revealTrans.play() } else{ hidemenu() } } } function dropit(e){ if (document.coffeemenu03.visibility=="hide") document.coffeemenu03.visibility="show" else document.coffeemenu03.visibility="hide" document.coffeemenu03.left=e.pageX-e.layerX document.coffeemenu03.top=e.pageY-e.layerY+19 return false } function hidemenu(){ if (enableeffect) coffeemenu03.filters.revealTrans.stop() coffeemenu03.style.visibility="hidden" } function hidemenu2(){ document.coffeemenu03.visibility="hide" } if (document.layers){ document.coffeemenu01.document.coffeemenu02.captureEvents(Event.CLICK) document.coffeemenu01.document.coffeemenu02.onclick=dropit } else if (document.all) document.body.onclick=hidemenu </script> <div id="coffeemenu03" style="position:absolute;left:0;top:0;layer-background-color:#C0C0C0;background-color:#C0C0C0;width:200;visibility:hidden;border:2px solid black;padding:0px"> <script language="JavaScript1.2"> if (document.all) coffeemenu03.style.padding='4px' for (i=0;i<selection.length;i++) document.write(selection[i]) </script> </div> <script language="JavaScript1.2"> if (document.layers){ document.coffeemenu03.captureEvents(Event.CLICK) document.coffeemenu03.onclick=hidemenu2 } </script> <!-- END OF Drop Down DHTML -->
Message Reader
نمايش متن به صورت افکت
<!-- START OF Message Reader DHTML --> <!-- SUMMARY BRIEFS This DHTML script will cycle through 4 different text links. You can adjust the text and links below to meet your webpage. IMPORTANT Make suer that this body tag is included in your webpage. It activates the Message Reader. --> <body onload="if (document.all||document.layers) {regenerate2();update()}"> <style> <!-- #msgline{ position:relative; layer-background-color:black; width:400; height:12; } #msgtext{ background-color:black; position:absolute; border: 1px solid black; width:400; height:12; } .msgtextfont{ font:bold 16px Arial; postition:absolute; left:5px; text-decoration:none; color:white; } .msgtextfont a{ color:white; text-decoration:none; } --> </style> <div id="msgline"> <div id="msgtext" class="msgtextfont">Starting Messages...</div> </div> <script language="JavaScript1.2"> var speed=4000 var news=new Array() news[0]="<a href='http://www.iransuns.com'>First line of text....</a>" news[1]="<a href='http://www.iransuns.com'>Second line of text....</a>" news[2]="<a href='http://www.iransuns.com'>Third line of text....</a>" news[3]="<a href='http://www.iransuns.com'>Add as many as you want....</a>" i=0 if (document.all) tickerobject=document.all.msgtext.style else tickerobject=document.msgline.document function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers) setTimeout("window.onresize=regenerate",450) } function update(){ BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10); if (document.layers){ document.msgline.document.msgtext.document.write('<span class="msgtextfont">'+news[i]+'</span>') document.msgline.document.msgtext.document.close() } else document.all.msgtext.innerHTML=news[i] if (i<news.length-1) i++ else i=0 setTimeout("update()",speed) } function BgFade(red1, grn1, blu1, red2, grn2, blu2, steps) { sred = red1; sgrn = grn1; sblu = blu1; ered = red2; egrn = grn2; eblu = blu2; inc = steps; step = 0; MsgDither(); } function MsgDither() { var epct = step/inc; var spct = 1 - epct; if (document.layers) tickerobject.bgColor = Math.floor(sred * spct + ered * epct)*256*256 + Math.floor(sgrn * spct + egrn * epct)*256 + Math.floor(sblu * spct + eblu * epct); else tickerobject.backgroundColor= Math.floor(sred * spct + ered * epct)*256*256 + Math.floor(sgrn * spct + egrn * epct)*256 + Math.floor(sblu * spct + eblu * epct); if ( step < inc ) { setTimeout('MsgDither()',50); } step++; } </script> <!-- END OF Message Reader DHTML -->
Rolling Credits
به حرکت در آوردن آسکرول لاک از بالا به پايين
<!-- START OF Rolling Credits DHTML --> <!-- SUMMARY BRIEFS This example shows how you can create a webpage that scrolls up. The webpage must be long (vertically) in order for the effect to work. --> <SCRIPT LANGUAGE="JavaScript"> <!-- var position = 0; function scroller() { if (position != 320) { position++; scroll(0,position); clearTimeout(timer); var timer = setTimeout("scroller()",3); timer; } else { location.replace("#"); } } // --> </SCRIPT> </HEAD> <BODY onload="scroller()"> <CENTER> <font face="VERDANA, ARIAL" size="5" color=804040>Rolling Credits</font><p> <font face="VERDANA, ARIAL" size="4">Powered By IRANSUNS: <HR WIDTH=350 NOSHADE> <P> www.iransuns.com<P> Download Center<P>Upload Center<P>E-Mail<p> PHP<P>HTML<P>VB<p> Photoshop<P>Game<p> Hack<P>Boot<p> <P> Program<P> <A HREF="http://www.iransuns.com/">.: Just :.</A><p> Leran<P> Hosting<P> ...<p> <p></font> </CENTER> <!-- END OF Rolling Credits DHTML -->
Slide Out
نمايش لينک به صورت منويي
<!-- START OF Slide Out DHTML --> <!-- SUMMARY BRIEFS This DHTML script is an entire webpage by itself. Open it up into a blank webpage and try it out. You can then add your content around it. Basically, you can have 5 different "layers" which switch when the user clicks on the appropriate links. You can adjust the links, colors, and text below. IMPORTANT This example has an image. It is found in the CoffeeCup Software folder on your hard drive. --> <SCRIPT LANGUAGE="JavaScript"> <!-- n = (document.layers) ? 1:0 ie = (document.all) ? 1:0 function init() { slideoutActive = 0 if (n) { slideout1 = document.slideoutInterface.document.slideoutContent.document.slideoutContent1 slideout2 = document.slideoutInterface.document.slideoutContent.document.slideoutContent2 slideout3 = document.slideoutInterface.document.slideoutContent.document.slideoutContent3 slideout4 = document.slideoutInterface.document.slideoutContent.document.slideoutContent4 slideout5 = document.slideoutInterface.document.slideoutContent.document.slideoutContent5 } if (ie) { slideout1 = slideoutContent1.style slideout2 = slideoutContent2.style slideout3 = slideoutContent3.style slideout4 = slideoutContent4.style slideout5 = slideoutContent5.style } slideoutShown = slideout1 slideoutShown.xpos = 0 slideoutNew = "none" slideoutNew.xpos = -285 } function slideout(which) { if (!slideoutActive && slideoutShown != which) { slideoutActive = 1 slideoutNew = which slideoutNew.xpos = -285 slideoutLeft() } } function slideoutLeft() { if (slideoutShown.xpos > -285) { slideoutShown.xpos -= 15 slideoutShown.left = slideoutShown.xpos setTimeout("slideoutLeft()",30) } else { hide(slideoutShown) show(slideoutNew) setTimeout("slideoutRight()",50) } } function slideoutRight() { if (slideoutNew.xpos < 0) { slideoutNew.xpos += 15 slideoutNew.left = slideoutNew.xpos setTimeout("slideoutRight()",30) } else { slideoutShown = slideoutNew slideoutActive = 0 // stops the sequence } } function show(showobj) { if (n) showobj.visibility = "show" if (ie) showobj.visibility = "visible" } function hide(hideobj) { if (n) hideobj.visibility = "hide" if (ie) hideobj.visibility = "hidden" } //--> </SCRIPT> <STYLE TYPE="text/css"> <!-- A {color:#000000; font-family:'Arial'; font-weight:bold; font-size:10pt; text-decoration:none; line-height:20pt;} STRONG {font-family:'Arial'; font-size:15pt; font-weight:bold; line-height:25pt;} P {font-family:'Arial'; font-size:10pt; line-height:13pt;} TD {font-family:'Arial'; font-size:10pt; line-height:13pt;} #slideoutInterface {position:absolute; left:50; top:50; width:400; height:250; clip:rect(0,400,250,0); background-color:#000000; layer-background-color:#000000; visibility:visible;} #slideoutSidebar1 {position:absolute; left:5; top:5; width:100; height:30; clip:rect(0,100,30,0); background-color:#9797FF; layer-background-color:#9797FF;} #slideoutSidebar2 {position:absolute; left:5; top:40; width:100; height:30; clip:rect(0,100,30,0); background-color:#FFFF00; layer-background-color:#FFFF00;} #slideoutSidebar3 {position:absolute; left:5; top:75; width:100; height:30; clip:rect(0,100,30,0); background-color:#FF80C0; layer-background-color:#FF80C0;} #slideoutSidebar4 {position:absolute; left:5; top:110; width:100; height:30; clip:rect(0,100,30,0); background-color:#00FF80; layer-background-color:#00FF80;} #slideoutSidebar5 {position:absolute; left:5; top:145; width:100; height:30; clip:rect(0,100,30,0); background-color:#FF5353; layer-background-color:#FF5353;} #slideoutContent {position:absolute; left:110; top:5; width:285; height:240; clip:rect(0,285,240,0); background-color:#000000; layer-background-color:#000000;} #slideoutContent1 {position:absolute; left:0; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:visible;} #slideoutContent2 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:hidden;} #slideoutContent3 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:hidden;} #slideoutContent4 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:hidden;} #slideoutContent5 {position:absolute; left:-285; top:0; width:285; height:240; clip:rect(0,285,240,0); background-color:#DEDEDE; layer-background-color:#DEDEDE; visibility:hidden;} //--> </STYLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" onLoad="init()"> <DIV ID="slideoutInterface"> <DIV ID="slideoutSidebar1"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout1)">Contact Us</A></P></DIV> <DIV ID="slideoutSidebar2"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout2)">Help</A></P></DIV> <DIV ID="slideoutSidebar3"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout3)">Services</A></P></DIV> <DIV ID="slideoutSidebar4"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout4)">Products</A></P></DIV> <DIV ID="slideoutSidebar5"><P ALIGN=CENTER><A HREF="javascript:slideout(slideout5)">Order</A></P></DIV> <DIV ID="slideoutContent"> <DIV ID="slideoutContent1"> <P ALIGN="CENTER"><STRONG>Contact Us</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.iransuns.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> <DIV ID="slideoutContent2"> <P ALIGN="CENTER"><STRONG>Help</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.iransuns.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> <DIV ID="slideoutContent3"> <P ALIGN="CENTER"><STRONG>Services</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.iransuns.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> <DIV ID="slideoutContent4"> <P ALIGN="CENTER"><STRONG>Products</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.iransuns.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> <DIV ID="slideoutContent5"> <P ALIGN="CENTER"><STRONG>Order</STRONG> <P> <TABLE BORDER=0 WIDTH=275><TD> You can add <A HREF="http://www.iransuns.com"><FONT COLOR=BLUE>Links</FONT></A>. <P> Or images: <IMG SRC="smile.gif" BORDER=0 HEIGHT=11 WIDTH=11> <P> Or just use text to explain what you have or what you are doing. </TD></TABLE> </P> </DIV> </DIV> </BODY> </HTML> <!-- END OF Slide Out DHTML -->
Zoom Message
<!-- START OF Zoom Message DHTML --> <!-- SUMMARY BRIEFS This example shows how you can create a webpage that displays lines of text that appear to be flying out of the webpage. Our example has an image. IMPORTANT The image used in this example can be found in the CoffeeCup Software folder. You do not need an image for it to work. --> <!-- Style Sheet created with the CoffeeCup StyleSheet Maker++ --> <!-- http://www.coffeecup.com --> <style type="text/css"> body { background-color:#FFFFFF; font-family: Arial; font-size:10pt; } </style> <script> //<!--Change this text--> text=new Array('Www.','IranSuns','.coM','The Best Website') //<!--This is the number of words in your message--> var numText=4 //<!--These are the colors the last word will fade to. The first color is the main color.--> color=new Array('#000000','red','red','red','red') //<!--This is the total number of colors from above.--> var numColors=5 //<!--This is the size you want the zoom to end at.--> var endSize=70 //<!--This is the speed you want it to zoom in.--> var Zspeed=30 //<!--This is the speed the colors will fade.--> var Cspeed=200 //<!--This is the font of the fade in message.--> var font='Arial Black' //<!--This will allow you to have the message stay or go. True will make it go. // False will make it stay.--> var hide=false var size=10 var gonum=0 var ie, n; if (document.all) { n=0 ie=1 zoomText='document.all.zoom.innerText=text[num]' zoomSize='document.all.zoom.style.fontSize=size' closeIt="" fadeColor="document.all.zoom.style.color=color[num]" } if (document.layers) { n=1;ie=0 zoomText="" zoomSize="document.zoom.document.write('<p align=\"center\" style=\"font-family:'+font+'; font-size:'+size+'px; color:'+color[0]+'\">'+text[num]+'</p>')" closeIt="document.zoom.document.close()" fadeColor="document.zoom.document.write('<p align=\"center\" style=\"font-family:'+font+'; font-size:'+endSize+'px; color:'+color[num]+'\">'+text[numText-1]+'</p>')" } function zoom(num,fn){ if (size<endSize){ eval(zoomText) eval(zoomSize) eval(closeIt) size+=5; setTimeout("zoom("+num+",'"+fn+"')",Zspeed) }else{ eval(fn); } } function fadeIt(num){ if (num<numColors){ eval(fadeColor) eval(closeIt) num+=1; setTimeout("fadeIt("+num+")",Cspeed) }else{ hideIt() } } function hideIt(){ if(hide){ if(ie)document.all.zoom.style.visibility="hidden" if(n)document.layers.zoom.visibility="hidden" } } function init(){ if(ie){ document.all.zoom.style.color=color[0] document.all.zoom.style.fontFamily=font } if(ie || n) go(0) } function go(num){ gonum+=1 size=10 if(num<numText){ zoom(num,'go('+gonum+')') }else{ fadeIt(0) } } </script> </head> <body onload="init()" bgcolor="FFFFFF"> <CENTER> </CENTER><P> <div id="zoom" align="center" style="position:absolute; top:150"> </DIV> <!-- END OF Zoom Message DHTML -->
Add Bookmark
اضافه کردن صفحه در بوکمارک
<!-- START OF Add Bookmark in IE DHTML --> <!-- SUMMARY BRIEF This code will allow you to put a link on your page that, when clicked, will add a URL to the user's Favorites. NOTE: This will only work for IE users. It will NOT work for users using Netscape. You can change the bookmark link and text in the var bookmarkurl and var bookmarktitle attributes below. You can change the text of the actual link in the <A HREF> code that you will place for your link to appear in your page. It is located at the bottom of this page. --> <!-- Put this code inside of your <HEAD> tag. --> <script language="JavaScript1.2"> <!-- var bookmarkurl="http://www.iransuns.com/" var bookmarktitle="-=[ IRAN-SUNS Web Site ]=-" function ccaddbookmark() { if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle) } //--> </script> <!-- Put this code into your page wherever you want the link to be. --> <a href="javascript:ccaddbookmark()" target="_self"> <font size="1" face="Arial">[ Add IRAN-SUNS to your Favorites ]</font> </a> <!-- END OF Add Bookmark in IE DHTML -->
Mouse Cursor Crosshairs
دو خط قرمز بسيار زيبا به دنبال موس
<!-- START OF Mouse Cursor Crosshairs DHTML --> <!-- SUMMARY BRIEF This DHTML script will make a crosshair to follow your mouse cursor around. You can change the color of the crosshair by changing the color hex codes in the <style> tag in the <head> of your document. --> <!-- Put this portion of the script inside of your <HEAD> tag --> <style> <!-- #leftright, #topdown{ position: absolute; left: 0; top: 0; width: 1px; height: 1px; layer-background-color: #FF0000; background-color: #FF0000; z-index: 100; font-size: 1px; } --> </style> <!-- Put this code after your <BODY> tag. --> <div id="leftright" style="width:expression(document.body.clientWidth-2)"></div> <div id="topdown" style="height:expression(document.body.clientHeight-2)"></div> <script language="JavaScript1.2"> <!-- if (document.all&&!window.print){ leftright.style.width=document.body.clientWidth-2 topdown.style.height=document.body.clientHeight-2 } else if (document.layers){ document.leftright.clip.width=window.innerWidth document.leftright.clip.height=1 document.topdown.clip.width=1 document.topdown.clip.height=window.innerHeight } function followmouse1(){ //move cross engine for IE 4+ leftright.style.pixelTop=document.body.scrollTop+event.clientY+1 topdown.style.pixelTop=document.body.scrollTop if (event.clientX<document.body.clientWidth-2) topdown.style.pixelLeft=document.body.scrollLeft+event.clientX+1 else topdown.style.pixelLeft=document.body.clientWidth-2 } function followmouse2(e){ //move cross engine for NS 4+ document.leftright.top=e.y+1 document.topdown.top=pageYOffset document.topdown.left=e.x+1 } if (document.all) document.onmousemove=followmouse1 else if (document.layers){ window.captureEvents(Event.MOUSEMOVE) window.onmousemove=followmouse2 } function regenerate(){ window.location.reload() } function regenerate2(){ setTimeout("window.onresize=regenerate",400) } if ((document.all&&!window.print)||document.layers) //if the user is using IE 4 or NS 4, both NOT IE 5+ window.onload=regenerate2 //--> </script> <!-- END OF Mouse Cursor Crosshairs DHTML -->
Default Start Up Page Link
لينک قرار دادن سايت در هوم پيج
<!-- START OF Default Start Up Page Link (IE) DHTML --> <!-- SUMMARY BRIEF This code makes a link that will set the user's default start up page (homepage) to whatever link you specify. You can change the URL (http://www.iransuns.com) to anything else you want. You can also change the Link Text in the code below. Make sure not to change any other code. --> <!-- Put this code wherever you want the link to be in your page. --> <font face="Tahoma" size="2" color="#008000"> <a class="chlnk" style="cursor:hand; text-decoration:none; font-weight:700" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.iransuns.com/');"> Click here to make IRAN-SUNS your default homepage! </a> </font> <!-- END OF Default Start Up Page Link (IE) DHTML -->
Disable Right Click Menu
از کار انداختن راست کليک
<!-- START OF Disable Right Click Menu DHTML --> <!-- SUMMARY BRIEF This code will disable all right click menus in all browsers and on all operating systems. --> <!-- Put this code inside of your <HEAD> tag. --> <SCRIPT LANGUAGE="JavaScript"> <!-- document.oncontextmenu = function(){return false} if(document.layers) { window.captureEvents(Event.MOUSEDOWN); window.onmousedown = function(e){ if(e.target==document)return false; } } else { document.onmousedown = function(){return false} } // --> </script> <!-- END OF Disable Right Click Menu DHTML -->
Find In Page Form
قرار دادن جستجوگر کلمه در سايت
<!-- START OF Find In Page Form DHTML --> <!-- SUMMARY BRIEF This DHTML script mimics the Find (Ctrl+F) feature in your browser. It will look in the current page for whatever text the user inputs. If it finds the text, it hilights the text so the user can see it. If it doesn't find the text, it pops up a javascript alert stating that the text was not found on the current page. --> <!-- Put this portion of the script inside of your <HEAD> tag --> <script language="JavaScript"> 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("Not found."); } } return false; } </script> <!-- Put this code into your page where you want the search form to appear. --> <form name="search" onSubmit="return findInPage(this.string.value);"> <font size=3><input name="string" type="text" size=15 onChange="n = 0;"></font> <input type="submit" value="Find"> </form> <!-- END OF Find In Page Form DHTML -->
Left-to-Right Page Scroll
از چپ به راست بردن اسکرول لاک
<!-- START OF Left-to-Right Page Scroll DHTML --> <!-- SUMMARY BRIEF This code will automatically scroll the page from left to right in the browser window. You can change the speed that the page scrolls by changing the var speed attribute in the code. Do not use negative numbers! --> <!-- Put this code inside of your <HEAD> tag. --> <script language="JavaScript1.2"> <!-- // Change the scrolling speed by changing the var speed attribute below. // The higher the number, the faster the page will scroll. // Do not use negative numbers! var speed=2 var currentpos=0,alt=1,curpos1=0,curpos2=-1 function initialize(){ startscroll() } function leftrightscroll(){ if (document.all) temp=document.body.scrollLeft else temp=window.pageXOffset if (alt==0) alt=1 else alt=0 if (alt==0) curpos1=temp else curpos2=temp if (curpos1!=curpos2){ if (document.all) currentpos=document.body.scrollLeft+speed else currentpos=window.pageXOffset+speed window.scroll(currentpos,0) } else{ currentpos=0 window.scroll(currentpos,0) } } function startscroll(){ setInterval("leftrightscroll()",10) } window.onload=initialize //--> </script> <!-- END OF Left-to-Right Page Scroll DHTML -->
Scrollable Embedded Window
قرار دادن متن در پنجره اي زيبا
<!-- START OF Scrollable Embedded Window DHTML --> <!-- SUMMARY BRIEF This DHTML script will put a small, fixed, scrollable window into your page. You can change the height, width, background color and content of the window. How to configure the script: The width of the "window" is 170 and the height is 150. To alter the height and width of the window, change ALL instances of 170 to another value, and the same for 150 (it'll be faster if you just do a search-and-replace). You can also give the window a different background color by changing "white" to another color name or hex code. Also, change the text to whatever you want by replacing the text (you can use HTML as well) inside of the <DIV> tag. --> <!-- Put this code into your page wherever you want the small window to be. --> <ilayer name="scroll1" width=170 height=150 clip="0,0,170,150"> <layer name="scroll2" width=170 height=150 bgColor="white"> <div id="scroll3" style="width:170;height:150;background-color:yellow;overflow:scroll"> This is a nifty little script that allows you to put any content you want within a scrollable mini "window". This will allow you to save valuable screen space while making your page more "interactive". <br><br> This script uses two different techniques, one for Internet Explorer and one for Netscape, to create the scrollable window. <br><br> IE 4+ users will be able to use scrollbars to scroll the window, while Netscape users will have to use the "up" and "down" buttons instead (since Netscape does not support the adding of scrollbars to the "window" contents). </div> </layer> </ilayer> <script> var nsstyle='display:""' if (document.layers) var scrolldoc=document.scroll1.document.scroll2 function up(){ if (!document.layers) return if (scrolldoc.top<0) scrolldoc.top+=10 temp2=setTimeout("up()",50) } function down(){ if (!document.layers) return if (scrolldoc.top-150>=scrolldoc.document.height*-1) scrolldoc.top-=10 temp=setTimeout("down()",50) } function clearup(){ if (window.temp2) clearInterval(temp2) } function cleardown(){ if (window.temp) clearInterval(temp) } </script> <br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()" onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#" onMousedown="down()" onMouseup="cleardown()" onClick="return false" onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span> <!-- END OF Scrollable Embedded Window DHTML -->
Window Auto Maximize
اتوماتيک صفحه را ماکسيمايز مي کند
<!-- START OF Window Auto Maximize DHTML --> <!-- SUMMARY BRIEF This code will automatically maximize the browser window when the page is loaded. --> <!-- Put this code inside of your <HEAD> tag. --> <script language="JavaScript1.2"> <!-- top.window.moveTo(0,0); if (document.all) { top.window.resizeTo(screen.availWidth,screen.availHeight); } else if (document.layers||document.getElementById) { if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){ top.window.outerHeight = screen.availHeight; top.window.outerWidth = screen.availWidth; } } //--> </script> <!-- END OF Window Auto Maximize DHTML -->
Watermark Jump to Top Link
پرش به بالاي صفحه
<!-- START OF Watermark Jump to Top Link DHTML --> <!-- SUMMARY BRIEF This DHTML script will put a small watermark link in the bottom right corner of your page that will stay there even when the page scrolls. This link will always take the user back to the top of the page. --> <!-- Put this portion of the script inside of your <HEAD> tag --> <script> <!-- // Change this text to the text that you want to be displayed as the link on your page. var displayed="<nobr><font size=2 face=Arial><b>[Top]</b></font></nobr>" // === DO NOT EDIT ANYTHING BELOW THIS LINE!!! === // var logolink='javascript:window.scrollTo(0,0)' var ns4=document.layers var ie4=document.all var ns6=document.getElementById&&!document.all function regenerate(){ window.location.reload() } function regenerate2(){ if (ns4) setTimeout("window.onresize=regenerate",400) } if (ie4||ns6) document.write('<span id="logo" style="position:absolute;top:-300;z-index:100">'+displayed+'</span>') function createtext(){ //function for NS4 staticimage=new Layer(5) staticimage.left=-300 staticimage.document.write('<a href="'+logolink+'">'+displayed+'</a>') staticimage.document.close() staticimage.visibility="show" regenerate2() staticitns() } function staticit(){ //function for IE4/ NS6 var w2=ns6? pageXOffset+w : document.body.scrollLeft+w var h2=ns6? pageYOffset+h : document.body.scrollTop+h crosslogo.style.left=w2 crosslogo.style.top=h2 } function staticit2(){ //function for NS4 staticimage.left=pageXOffset+window.innerWidth-staticimage.document.width-28 staticimage.top=pageYOffset+window.innerHeight-staticimage.document.height-10 } function inserttext(){ //function for IE4/ NS6 if (ie4) crosslogo=document.all.logo else if (ns6) crosslogo=document.getElementById("logo") crosslogo.innerHTML='<a href="'+logolink+'">'+displayed+'</a>' w=ns6? window.innerWidth-crosslogo.offsetWidth-20 : document.body.clientWidth-crosslogo.offsetWidth-10 h=ns6? window.innerHeight-crosslogo.offsetHeight-15 : document.body.clientHeight-crosslogo.offsetHeight-10 crosslogo.style.left=w crosslogo.style.top=h if (ie4) window.onscroll=staticit else if (ns6) startstatic=setInterval("staticit()",100) } if (ie4||ns6){ window.onload=inserttext window.onresize=new Function("window.location.reload()") } else if (ns4) window.onload=createtext function staticitns(){ //function for NS4 startstatic=setInterval("staticit2()",90) } //--> </script> <!-- END OF Watermark Jump to Top Link DHTML -->
Watermark Navigation Menu
منويي زيبا که هميشه همراه تان است
<!-- START OF Watermark Navigation Menu DHTML --> <!-- SUMMARY BRIEF This DHTML script will make a navigation menu that will follow your screen as you scroll, kind of like the old Geocities? watermark. Look through the code for comments that will tell you where to change the code to configure it how you want in order to display the links that you want. --> <!-- Put this code inside of your <HEAD> tag. --> <STYLE TYPE="text/css"> <!-- .menuheader { BORDER-COLOR : #000000 ; cursor : hand ; Border-Left : #000000 ; Border-Top : #000000 ; Padding-Left : 1px ; Padding-Top : 1px ; Background-Color : #000000 ; } .menu { Background-Color : white ; } .home { cursor : hand ; } .menulinks { text-decoration:none; } //--> </STYLE> <!-- Put this code inside of your <BODY> tag on your page, but OUTSIDE of any other tags. This can NOT be inside of any other tags on your page. --> <SCRIPT Language="Javascript1.2"> <!-- /////////////////////////////////////////////////////////////// // Change the width and placement of the menu on the page below. /////////////////////////////////////////////////////////////// var menuwidth=110 var offsetleft=10 var offsettop=10 var ns4=document.layers?1:0 var ie4=document.all?1:0 var ns6=document.getElementById&&!document.all?1:0 function makeStatic() { if (ie4) {object1.style.pixelTop=document.body.scrollTop+offsettop} else if (ns6) {document.getElementById("object1").style.top=window.pageYOffset+offsettop} else if (ns4) {eval(document.object1.top=eval(window.pageYOffset+offsettop));} setTimeout("makeStatic()",0); } if (ie4||ns6) {document.write('<span ALIGN="CENTER" ID="object1" STYLE="Position:absolute; Top:20; Left:'+offsetleft+'; Z-Index:5;cursor:hand;background-color:black;"><TABLE BORDER="1" width="'+menuwidth+'" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="black" bgcolor="white">')} else if (ns4){ document.write('<LAYER top="20" name="object1" left="'+offsetleft+'" BGCOLOR=black><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1"><TR><TD><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="'+menuwidth+'">')} /////////////////////////////////////////////////////////////// // Change the name of the menu (the text at the top) below. // You can also shange the font face, size and border colors. /////////////////////////////////////////////////////////////// if (ie4||ns6||ns4) document.write('<TR><TD BGCOLOR="#3399FF" BORDERCOLORDARK="#99CCFF" BORDERCOLORLIGHT="#003399"><P ALIGN=CENTER><FONT SIZE="4" FACE=ARIAL>Navigation</FONT></TD></TR>') var menui = new Array(); var menul = new Array(); /////////////////////////////////////////////////////////////// // Edit menus listing here. You can make as many as you need, // just make sure that the numbers go up in order correctly. // The "menui" variables are the actual link text that will // show up in the menu. The "menul" variables are the URLs // that match the text displayed there. /////////////////////////////////////////////////////////////// menui[0]="IRAN-SUNS"; menui[1]="Download"; menui[2]="Upload Center"; menui[3]="Free Learning"; menui[4]="Hack"; menui[5]="Boot"; menui[6]="Program"; menui[7]="And Many ..."; menul[0]="http://www.iransuns.com"; menul[1]="http://www.iransuns.com"; menul[2]="http://www.iransuns.com"; menul[3]="http://www.iransuns.com"; menul[4]="http://www.iransuns.com"; menul[5]="http://www.iransuns.com"; menul[6]="http://www.iransuns.com"; menul[7]="http://www.iransuns.com"; for (i=0;i<=menui.length-1;i++) /////////////////////////////////////////////////////////////// // You can change table cell background colors below. // Just change the color names to whatever you want, // but do NOT change any other code. /////////////////////////////////////////////////////////////// if (ie4||ns6) {document.write('<TR><TD BORDERCOLOR="white" ONCLICK="location=\''+menul[i]+'\'" onmouseover="className=\'menuheader\'" onMouseout="className=\'menu\'"><CENTER><FONT>'+menui[i]+'</FONT></TD></TR>')} else if (ns4){document.write('<TR><TD BGCOLOR="white"><ILAYER><LAYER width="'+menuwidth+'" onmouseover="bgColor=\'yellow\'" onmouseout="bgColor=\'white\'"><CENTER><A HREF="'+menul[i]+'" class=menulinks>'+menui[i]+'</A></CENTER></LAYER></ILAYER></TD></TR>')} if (ie4||ns6) {document.write('</TABLE></span>')} else if (ns4){document.write('</TABLE></TD></TR></TABLE></LAYER>')} function menu3(){ if (ns6||ie4||ns4) makeStatic() } window.onload=menu3 //--> </SCRIPT> <!-- END OF Watermark Navigation Menu DHTML -->
Mouse Cursor Text Trailer
نمايش متن دلخواه شما به دنبال موس
<!-- START OF Mouse Cursor Text Trailer DHTML --> <!-- SUMMARY BRIEF This DHTML script will make a text message follow your cursor around the screen. You can change the message to say whatever you want. You can change the font face, color and size in the .trailersytle tag below. You can change the message in the javascript below that. Just look for the comment that says "Insert your personal message below." --> <!-- Put this portion of the script inside of your <HEAD> tag --> <style> .trailerstyle { position: absolute; visibility: visible; top: -50px; font-size: 12px; font-family: Arial,Helvetica,Verdana; font-weight: bold; color: #000000; } </style> <script> <!-- var x,y var step=20 var flag=0 // Insert your personal message below. // Important: Do NOT remove the space at the end of the sentence!!! var message="^^^ Www.IranSuns.coM ^^^ " message=message.split("") var xpos=new Array() for (i=0;i<=message.length-1;i++) { xpos[i]=-50 } var ypos=new Array() for (i=0;i<=message.length-1;i++) { ypos[i]=-50 } function handlerMM(e){ x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY flag=1 } function mousetrailer() { if (flag==1 && document.all) { for (i=message.length-1; i>=1; i--) { xpos[i]=xpos[i-1]+step ypos[i]=ypos[i-1] } xpos[0]=x+step ypos[0]=y for (i=0; i<message.length-1; i++) { var thisspan = eval("span"+(i)+".style") thisspan.posLeft=xpos[i] thisspan.posTop=ypos[i] } } else if (flag==1 && document.layers) { for (i=message.length-1; i>=1; i--) { xpos[i]=xpos[i-1]+step ypos[i]=ypos[i-1] } xpos[0]=x+step ypos[0]=y for (i=0; i<message.length-1; i++) { var thisspan = eval("document.span"+i) thisspan.left=xpos[i] thisspan.top=ypos[i] } } var timer=setTimeout("mousetrailer()",30) } //--> </script> <!-- Put this code inside of your <BODY> tag. --> <script> <!-- for (i=0;i<=message.length-1;i++) { document.write("<span id='span"+i+"' class='trailerstyle'>") document.write(message[i]) document.write("</span>") } if (document.layers){ document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = handlerMM; //--> </script> <!-- Lastly, insert the following into the <BODY> tag, itself, just like the example that follows. --> example: <body onLoad="mousetrailer()" style="width:100%;overflow-x:hidden;overflow-y:scroll"> <!-- END OF Mouse Cursor Text Trailer DHTML -->
Background Changer
تغيير رنگ پشت صفحه
<!-- Background Changer Just make sure you add your Title before this script. If you change the last line in will give you the rest of the information for your page (link color,text etc.) Play with the colors !--> <script> // Modified by CoffeeCup Software function initArray() { this.length = initArray.arguments.length for (var i = 0; i < this.length; i++) this[i+1] = initArray.arguments[i] } var hexChars = "0123456789ABCDEF"; function Dec2Hex (Dec) { var a = Dec % 16; var b = (Dec - a)/16; hex = "" + hexChars.charAt(b) + hexChars.charAt(a); return hex; } function bgChanger (begin, end, steps) { steps = steps -1 ; redA = begin.charAt(0) + begin.charAt(1); red_valA = parseInt(redA,'16'); redB = end.charAt(0) + end.charAt(1); red_valB = parseInt(redB,'16'); red_int = ((red_valB - red_valA) / steps) * -1; grnA = begin.charAt(2) + begin.charAt(3); grn_valA = parseInt(grnA,'16'); grnB = end.charAt(2) + end.charAt(3); grn_valB = parseInt(grnB,'16'); grn_int = ((grn_valB - grn_valA) / steps) * -1; bluA = begin.charAt(4) + begin.charAt(5); blu_valA = parseInt(bluA,'16'); bluB = end.charAt(4) + end.charAt(5); blu_valB = parseInt(bluB,'16'); blu_int = ((blu_valB - blu_valA) / steps) * -1; step = 2; red = red_valA; grn = grn_valA; blu = blu_valA; document.bgColor = begin; while ( steps >= step ) { red -= red_int; red_round = Math.round(red); red_hex = Dec2Hex(red); grn -= grn_int; grn_round = Math.round(grn); grn_hex = Dec2Hex(grn); blu -= blu_int; blu_round = Math.round(blu); blu_hex = Dec2Hex(blu); document.bgColor = red_hex + grn_hex + blu_hex; step++; } document.bgColor = end; } </script> </head> <body bgcolor=#000000 text=#FFFFFF link="FF0000" vlink="8888FF" alink="FF00FF"> <script> <!-- // black to black (pause) bgChanger("000000","000000",25); // black to red bgChanger("000000","FF0000",25); // red to black bgChanger("FF0000","000000",25); // black to purple bgChanger("000000","AA00EE",25); // purple to black bgChanger("AA00EE","000000",25); // black to blue bgChanger("000000","0000FF",25); // blue to black bgChanger("0000FF","000000",25); // black to black (pause) bgChanger("000000","000000",25); // --> </script> </head> <body> <BODY BGCOLOR=000000 text="#ffffff" link="#0000ff" vlink="#c00c0"> <CENTER><H2>^^^ IRAN SUNS TEAM ^^^</CENTER></H2>
Opens a separate window
ايجاد لينک زير شاخه اي
<!-- This script opens a separate window for the locations you give it. Pages are neat but pictures make a cool photo album. Change the attributes that read menubar=0,toolbar=0, etc... and Width & Height to meet your needs. Make sure you place the URL's you want to go to and their names below.--> <script language="JavaScript"> <!-- Hide the script from old browsers -- function surfto(form) { var myindex=form.dest.selectedIndex window.open(form.dest.options[myindex].value,"main","menubar=1,toolbar=0,location=0,directories=0,status=1,copyhistory=0,width=235,height=235"); } //--> </SCRIPT> <CENTER> <FORM NAME="myform"> <SELECT NAME="dest" SIZE=1> <OPTION VALUE="http://www.IRANSUNS.com">IRAN-SUNS <OPTION VALUE="http://www.hosting.iransuns.com">Hosting <OPTION VALUE="http://www.IRANSUNS.com">Download <OPTION VALUE="http://www.IRANSUNS.com">Upload Center </SELECT> <P> <INPUT TYPE="BUTTON" VALUE="Go !" onClick="surfto(this.form)"> </FORM> </CENTER>
On / Off Screen
دکمهء خاموش و روشن کردن صفحه
<!-- DESCRIPTION: This will make your background colors change upon buttonclick. INSTRUCTIONS: Place this script 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 JavaScript. --> <SCRIPT LANGUAGE="JavaScript"> //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); } </SCRIPT> <CENTER><FORM><INPUT TYPE="BUTTON" VALUE="On/Off Switch" onClick="blinkCC(self)"></FORM></CENTER>
Change Background
<!-- Start of Change BackGround Color--> <!-- DESCRIPTION: This will allow the user to change the background color of your page. Neat trick. INSTRUCTIONS: Place this script anywhere in the <BODY> tag. FUNCTIONALITY: Works in both Netscape and IE. --> <!-- //Modified by CoffeeCup Software //This code is Copyright (c) 1998 CoffeeCup Software //All rights reserved. License is granted to a single user to //reuse this code on a personal or business Web Site. // --> <CENTER> <FORM> <FONT FACE="VERDANA, ARIAL"><B>Choose a background color:</B></FONT>? <SELECT name="ccGround" size="1" onChange=(document.bgColor=ccGround.options[ccGround.selectedIndex].value)> <OPTION value="408080" target="1" selected>Cool Green <OPTION value="C0C0C0" target="1">Cool Grey <OPTION value="000000" target="1">Black <OPTION value="730200" target="1">DarkRed <OPTION value="231800" target="1">Brown <OPTION value="044302" target="1">DarkGreen <OPTION value="0D09A3" target="1">Dark Blue <OPTION value="808040" target="1">Avocado <OPTION value="800080" target="1">Purple <OPTION value="444444" target="1">Gray <OPTION value="FF0400" target="1">Red <OPTION value="EFE800" target="1">Yellow <OPTION value="05EF00" target="1">Green <OPTION value="0206FF" target="1">Blue <OPTION value="AE08EF" target="1">Violet <OPTION value="FF8C8A" target="1">Mauve <OPTION value="FF80FF" target="1">Pink <OPTION value="FFCCCC" target="1">Peach <OPTION value="FFCC99" target="1">Orange <OPTION value="000080" target="1">Darker Blue <OPTION value="808080" target="1">Dark Grey <OPTION value="D5CCBB" target="1">Tan <OPTION value="DDDDDD" target="1">LightGray <OPTION value="FBFF73" target="1">Light Yellow <OPTION value="7CFF7D" target="1">LightGreen <OPTION value="A6BEFF" target="1">Light Blue <OPTION value="FFFFFF" target="1">White </SELECT></FORM></CENTER> <!-- Start of Change BackGround Color-->
Close Browser
خروج از جستجوگر
<!-- Start of Close Browser Script --> <!-- When the "Close Window" button is clicked, this script will close the browser window that the webpage is in. --> <script language="JavaScript"> <!-- function closeIt() { close(); } // --> </script> <center> <form> <input type=button value="Close Window" onClick="closeIt()"> </form> </center> <!-- End of Close Browser Script -->
Back / Forward Buttons
قرار دادن دکمهء عقب / جلو
<!-- Start of Back/Forward Buttons Script--> <!-- Instructions: Just put this script anywhere on your webpage and you will give your visitor 2 Back and Forward Navigation buttons. Designed for websites that have multiple webpages. --> <SCRIPT LANGUAGE="JavaScript"> <!-- hide this script tag's contents from old browsers function goHist(a) { history.go(a); // Go back one. } //<!-- done hiding from old browsers --> </script> <FORM METHOD="post"> <INPUT TYPE="button" VALUE=" BACK " onClick="goHist(-1)"> <INPUT TYPE="button" VALUE="FORWARD" onClick="goHist(1)"> </form> <!-- End of Back/Forward Buttons Script -->
Add to Favorites
اضافه کردن به Favorites
<!-- Start of Add to Favorites IE --> <!-- Put this script anywhere in your webpage and when a visitor goes to your webpage using Internet Explorer, they only need to click on the link to add your webpage to their FAVORITES folder. Netscape users will simply get a reminder to press CTRL-D to bookmark. --> <SCRIPT LANGUAGE="JavaScript"> <!-- if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) { var url="http://www.iransuns.com"; var title="IRANSUNS - Web Authoring Tools"; document.write('<A HREF="javascript:window.ext'); document.write('ernal.AddFavorite(url,title);" '); document.write('onMouseOver=" window.status='); document.write("'Add our site to your favorites!'; return true "); document.write('"onMouseOut=" window.status='); document.write("' '; return true "); document.write('">Add IRAN-SUNS site to your favorites!</a>'); } else { var msg = "Don't forget to bookmark us!"; if(navigator.appName == "Netscape") msg += " (CTRL-D)"; document.write(msg); } // --> </script> <!-- End of Add to Favorites IE -->
Background Info Scroller
پشت صفحه متحرک
<!-- Start of Background Info Scroller --> <!-- This script scrolls information about your visitor in the background of your page. --> <!-- Instructions: Just put this script anywhere in the body of your pages code. --> <!-- Script supplied with CoffeeCup HTML Editor --> <SCRIPT LANGUAGE="JavaScript1.1"> <!-- var y var bgticker var newline = "\r\r" var now = new Date() var millinow=now.getTime()/1000 var hours = now.getHours() var minutes = now.getMinutes() var seconds = now.getSeconds() var yourLocation="" now.setHours(now.getHours()+1) var min=60*now.getUTCHours()+now.getUTCMinutes() + now.getUTCSeconds()/60; var clock = "It's exactly "+hours+":"+minutes+":"+seconds+" hours" var browser = "You are using " + navigator.appName +" "+navigator.appVersion yourLocation="You are probably living in "+yourLocation var winwidth= window.screen.width var winheight= window.screen.height var screenresolution= "Screen resolution: "+window.screen.width+" x "+window.screen.height var lastdoc = "You came from: "+document.referrer var expDays = 30; var exp = new Date(); exp.setTime(exp.getTime() + (expDays*24*60*60*1000)); function Who(info){ var VisitorName = GetCookie('VisitorName') if (VisitorName == null) { VisitorName = "stranger"; SetCookie ('VisitorName', VisitorName, exp); } return VisitorName; } function When(info){ // When var rightNow = new Date() var WWHTime = 0; WWHTime = GetCookie('WWhenH') WWHTime = WWHTime * 1 var lastHereFormatting = new Date(WWHTime); // Date-i-fy that number var intLastVisit = (lastHereFormatting.getYear() * 10000)+(lastHereFormatting.getMonth() * 100) + lastHereFormatting.getDate() var lastHereInDateFormat = "" + lastHereFormatting; // Gotta use substring functions var dayOfWeek = lastHereInDateFormat.substring(0,3) var dateMonth = lastHereInDateFormat.substring(4,11) var timeOfDay = lastHereInDateFormat.substring(11,16) var year = lastHereInDateFormat.substring(23,25) var WWHText = dayOfWeek + ", " + dateMonth + " at " + timeOfDay // display SetCookie ("WWhenH", rightNow.getTime(), exp) return WWHText; } function Count(info){ var psj=0; var WWHCount = GetCookie('WWHCount') if (WWHCount == null) { WWHCount = 0; } else{ WWHCount++; } SetCookie ('WWHCount', WWHCount, exp); return WWHCount; } function set(){ VisitorName = prompt("Who are you?"); SetCookie ('VisitorName', VisitorName, exp); SetCookie ('WWHCount', 0, exp); SetCookie ('WWhenH', 0, exp); } function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function DeleteCookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); var cval = GetCookie (name); document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); } var countvisits="You've been here " + Count() + " time(s). Last time was " + When() +"." if (navigator.javaEnabled()) { var javaenabled="Your browser is able to run java-applets"; } else { var javaenabled="Your browser is not able to run java-applets"; } function showAlert() { var later = new Date() var millilater=later.getTime()/1000 var loadTime=(Math.floor((millilater-millinow)*100))/100 var loadTimeResult= "It took you "+loadTime+" seconds to load this page" var babiesborn=Math.ceil(loadTime*4.18) var babiesbornresult="While this page was loading "+babiesborn+" babies have been born" if (babiesborn==1){babiesbornresult="While this page was loading "+babiesborn+" baby has been born"} if (document.all) { y = document.body.clientHeight bgticker = document.all.bgtick.style bgticker.posLeft = 0 bgticker.posTop = y bgtick.innerHTML="<br><br>"+browser+".<br><br>"+clock+".<br><br>"+loadTimeResult+".<br><br>"+screenresolution+".<br><br>"+lastdoc+".<br><br>"+countvisits+"<br><br>"+javaenabled+".<br><br>"+babiesbornresult+".<br><br>And don't forget to download great software from www.IRANSUNS.com" document.all.mainbod.style.posLeft = 0 document.all.mainbod.style.posTop = 0 } if (document.layers) { y=300 bgticker = document.bgtick bgticker.left = 0 bgticker.top = y document.bgtick.document.write("<span style='font-size:50pt;color:AAAAAA'>"+browser+".<br><"+clock+".<br><"+loadTimeResult+".<br>"+internetTime+".<br>"+screenresolution+".<br>"+lastdoc+".<br>"+countvisits+".<br>"+javaenabled+".<br>"+babiesbornresult+".<br></span>") document.close() document.mainbod.left = 0 document.mainbod.top = 0 } scroll() } function scroll() { if (y > -1200) { y=y-2 if (document.all) {bgticker.posTop = y; document.all.mainbod.style.posTop=0} if (document.layers) {bgticker.top = y; document.mainbod.top=0} } else { if (document.all){y=document.body.clientHeight} if (document.layers){y=300} } var timer = setTimeout('scroll()',20) } // - End of JavaScript - --> </SCRIPT> <STYLE> .ticker { position: absolute; top:1200px; font-family:arial; font-weight:bold; font-size:40px; color:DDDDDD; } </STYLE> <body onLoad="showAlert()"> <div id="bgtick" class="ticker"> </div> <div id="mainbod" style="position:absolute; visibility:visible"> </div> <!-- End of Background Info Scroller -->
Browser ID
جستجو گر آي دي
<!-- Start of Browser ID JavaScript--> <!-- This Script allows the visitor to click on the buttons to display their browser's info --> <!-- Instructions: Just put the beginning of this script between your pages open and closing head tags and the later part in the body where you want it displayed in your page. --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <head><script> <!-- function CC_getBrowserName() { document.forms[0].elements[0].value =navigator.appName; } function CC_getBrowserVersion() { document.forms[0].elements[0].value = navigator.appVersion; } function CC_getBrowserCodeName() { document.forms[0].elements[0].value = navigator.appCodeName; } function CC_getBrowserUserAgent() { document.forms[0].elements[0].value = navigator.userAgent; } function CC_getBrowserNameVersion() { document.forms[0].elements[0].value = navigator.appName + " " + navigator.appVersion; } // --> </script> </head> <center> <center> <form NAME="detect"> <input TYPE="text" NAME="browser" SIZE="26" MAXLENGTH="40" VALUE="Browser Detection"><br> <br><br>Choose a button to reveal your browser's self image.<br> <input TYPE="button" VALUE="appName" onClick="CC_getBrowserName()"> <input TYPE="button" VALUE="appVersion" onClick="CC_getBrowserVersion()"> <input TYPE="button" VALUE="appCodeName" onClick="CC_getBrowserCodeName()"> <input TYPE="button" VALUE="userAgent" onClick="CC_getBrowserUserAgent()"> <input TYPE="button" VALUE="appName / appVersion" onClick="CC_getBrowserNameVersion()"><br><br><br> </form> </center><p> <!-- End of Browser ID JavaScript-->
Browser Shake
حرکت دادن جستجوگر به طرز بسيار جالب
<!-- Start of Browser Shake JavaScript --> <!-- This script causes your entire browser window to shake. ::rumble:: --> <!-- Instructions: Just put the beginning of this code inside your pages '<head>' tags and the later part inside your pages '<body>' tags. --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <script> function drop(n) { if(self.moveBy){ self.moveBy (0,-900); for(i = n; i > 0; i--){ self.moveBy(0,3); } for(j = 8; j > 0; j--){ self.moveBy(0,j); self.moveBy(j,0); self.moveBy(0,-j); self.moveBy(-j,0); } } } </script> <SCRIPT language="JavaScript"> <!-- var TrackRed= 0x00; //(RED) Replace the values after '0x' with the var TrackGreen= 0x00; //(GREEN) two-letter/number hexadecimal color codes var TrackBlue= 0x00; //(BLUE) in the BODY tag (after bgcolor=). function FadeTo(steps,red,green,blue) { for (var i = 0; i <= steps; i++) { var endpart = i/steps; var startpart = 1 - endpart; document.bgColor = Math.floor(TrackRed * startpart + red * endpart)*256*256 + Math.floor(TrackGreen * startpart + green * endpart)*256 + Math.floor(TrackBlue * startpart + blue * endpart); } TrackRed=red; TrackGreen=green; TrackBlue=blue; } //--> </SCRIPT> <STYLE TYPE="text/css"> <!-- A {text-decoration:none;} A:hover {color:silver;} //--> </STYLE> </head> <body bgcolor="black" text="silver" link="silver" vlink="silver" alink="silver" onload="drop(300); FadeTo(50,0xFF,0xFF,0xFF);"> <p align="center"><b><font face="Tahoma" size="2">Wellcom To <a href="http://www.iransuns.com/"> IRANSUNS ...</a></font></b></p> </body> </html> <!-- End of Browser Shake JavaScript -->
Close Window
دکمه اي براي خروج از پنجره
<!-- Window Closer Use either the form button or link to allow the user to close their browser when they click it, great for custom pop-up banners !--> <form> <input type=button value="Close Window" onClick="javascript:window.close();"> </form> or <a href="javascript:window.close();">Close Window</a>
Print Page Script
دکمه اي براي پرينت صفحه
<!-- Print Page Script Use this script to have your users print your HTML page --> <SCRIPT LANGUAGE="JavaScript"> if (window.print) { document.write('<form> ' + '<input type=button name=print value="Click" ' + 'onClick="javascript:window.print()"> To Print this page!</form>'); } // End --> </script>
Reload on Resize
رفرش کردن به هنگام تغيير اندازه جستجوگر
<!-- Reload on Resize If a user resizes the window, it will reload the page, good if you use multiple javascripts or dhtml on your page. --> <BODY onResize="window.location.href = window.location.href;">
Full Screen
دکمه اي براي تغيير اندازهء پنجره به Full Screen
<!-- Full Screen Use this script to make sure that your user's browser is opened up to full size !--> <script> function full_screen(){ window.moveTo(0,0) window.resizeTo(screen.width,screen.height) } </script> <form> <input type="button" onClick="full_screen()" value="Full Screen!"> </form>
Right Click Prevent
جلوگيري از راست کليک
<!-- Right Click - Prevent Script Use this link to help prevent users from stealing your code !--> <script language="JavaScript"> function right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("Right Click Mamnoo !!! Go To IRANSUNS.COM"); return false; } return true; } document.onmousedown=right; if (document.layers) window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right; </script>
Sliding Window Script
جستجوگر شما را به صورت زيبايي حرکت مي دهد
<!-- Sliding Window Script Use this for a cool sliding window effect for links --> <SCRIPT LANGUAGE="JavaScript"> function CoffeeWinMove() { for (var i = 1; i < 1001; i++) window.moveBy(1, 1); window.moveBy(-1000, -1000); } </script> <!-- Copy this into the BODY of your webpage --> <BODY> <center> <form> <input type=button value="Go to IRANSUNS.COM (with a form button)" onClick="CoffeeWinMove();window.location.href='http://www.iransuns.com';"> </form> or <a href="http://www.iransuns.com"; onClick="CoffeeWinMove()">Go to IRANSUNS.com (Using a Link)</a> </center>
Clock
ساعت
<!-- This is a clock that shows the system time --> <SCRIPT LANGUAGE="JavaScript"> var timerID = null; var timerRunning = false; function stopclock () { if(timerRunning) clearTimeout(timerID); timerRunning = false; } function showtime () { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds() var timeValue = "" + ((hours >12) ? hours -12 :hours) timeValue += ((minutes < 10) ? ":0" : ":") + minutes timeValue += ((seconds < 10) ? ":0" : ":") + seconds timeValue += (hours >= 12) ? " P.M." : " A.M." document.clock.face.value = timeValue; // you could replace the above with this // and have a clock on the status bar: // window.status = timeValue; timerID = setTimeout("showtime()",1000); timerRunning = true; } function startclock () { // Make sure the clock is stopped stopclock(); showtime(); } </SCRIPT> <BODY onLoad="startclock(); timerONE=window.setTimeout" TEXT="ffffff"> <CENTER><form name="clock" onSubmit="0"> <input type="text" name="face" size=13 value=""></CENTER>
Clock and Calendar
ساعت و تاريخ
<!-- This is a great Clock and Calendar, You MUST change the color= attribute in the script so you can view it on your pages--> <script language="JavaScript"> <!-- hide script from old browsers // Modified by CoffeeCup Software function process(){} today = new Date() if(today.getMinutes() < 10) { pad = "0"} else pad = ""; document.write("<center><FONT SIZE=4 color=black>Welcome!!</FONT></center>") if((today.getHours() < 12) && (today.getHours() >= 6)) { document.write("<center><FONT SIZE=4 color=black>Good Morning</FONT></center>")} if((today.getHours() >= 12) && (today.getHours() < 18)) { document.write("<center><FONT SIZE=4 color=black>Good Afternoon</FONT></center>")} if((today.getHours() >= 18) && (today.getHours() <= 23)) { document.write("<center><FONT SIZE=4 color=black>Good Evening</FONT></center>")} if((today.getHours() >= 0) && (today.getHours() < 4)) { document.write("<center><FONT SIZE=4 color=black>You're up late today.</FONT></center>")} if((today.getHours() >= 4) && (today.getHours() <= 6)) { document.write("<center><FONT SIZE=4 color=black>Wow! You are up early!!</FONT></center>")} document.write("<center><FONT SIZE=3 color=black>Time: ",today.getHours(),":",pad,today.getMinutes()) document.write(" Date: ",today.getMonth()+1,"/",today.getDate(),"/",today.getYear(),"<br></font></center>"); // end hiding contents --> </script>
Date
تاريخ
!--Start of JavaScript Place after the closing TITLE tag-- !-- DESCRIPTION This will create a header on the top right side of your webpage with the current date and time. INSTRUCTIONS Place this script in between the HEAD tags of your webpage. Change the size and color of the text by altering the values found in the next to last line of the JavaScript. FUNCTIONALITY Works in both Netscape & IE. -- SCRIPT LANGUAGE=JavaScript Modified by CoffeeCup Software This code is Copyright (c) 2000 CoffeeCup Software all rights reserved. License is granted to a single user to reuse this code on a personal or business Web Site. var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var timeValue = + ((hours 12) hours -12 hours) timeValue += ((minutes 10) 0 ) + minutes timeValue += (hours = 12) P.M. A.M. timerRunning = true; mydate = new Date(); myday = mydate.getDay(); mymonth = mydate.getMonth(); myweekday= mydate.getDate(); weekday= myweekday; myyear= mydate.getYear(); year = myyear if(myday == 0) day = Sunday, else if(myday == 1) day = Monday, else if(myday == 2) day = Tuesday, else if(myday == 3) day = Wednesday, else if(myday == 4) day = Thursday, else if(myday == 5) day = Friday, else if(myday == 6) day = Saturday, if(mymonth == 0) month = January else if(mymonth ==1) month = February else if(mymonth ==2) month = March else if(mymonth ==3) month = April else if(mymonth ==4) month = May else if(mymonth ==5) month = June else if(mymonth ==6) month = July else if(mymonth ==7) month = August else if(mymonth ==8) month = September else if(mymonth ==9) month = October else if(mymonth ==10) month = November else if(mymonth ==11) month = December document.write(BP ALIGN=RIGHTFONT SIZE=-1 FACE=VERDANA,ARIAL + timeValue + +day + month); document.write(myweekday+,+ 2000FONTBBRHR WIDTH=300 ALIGN=RIGHTP); SCRIPT !--This is the end of the JavaScript Make sure this script is between the HEAD tags--
Count Down
لحظات اخير
<!--Start of CountDown JavaScript--> <!-- DESCRIPTION: This countdown the days, hours, and minutes to any given date. INSTRUCTIONS: Place this script where you want the time remaining to be displayed. Change the date in ccDayThen to the date you are counting down to. FUNCTIONALITY: Works in both Netscape & IE. --> <SCRIPT LANGUAGE="JAVASCRIPT"> //Modified by CoffeeCup Software //This code is Copyright (c) 1998 CoffeeCup Software //All rights reserved. License is granted to a single user to //reuse this code on a personal or business Web Site. ccDayNow = new Date(); ccDayThen = new Date("December 31, 1999") msPerDay = 24 * 60 * 60 * 1000 ; timeLeft = (ccDayThen.getTime() - ccDayNow.getTime()); cc_daysLeft = timeLeft / msPerDay; daysLeft = Math.floor(cc_daysLeft); cc_hrsLeft = (cc_daysLeft - daysLeft)*24; hrsLeft = Math.floor(cc_hrsLeft); minsLeft = Math.floor((cc_hrsLeft - hrsLeft)*60); document.write( "There are "+daysLeft+" days, "+hrsLeft+" hours and "+minsLeft+" minuites left until the year 2000."); </SCRIPT> <!--This is the end of the CountDown JavaScript, make sure this script is between the BODY tags-->
How Long
نشان دهندهء مدت زماني که شما در صفحه بوديد
<!--Start of How Long JavaScript --> <!-- DESCRIPTION: This will pop up a message and tell the user how long they have been on your site. INSTRUCTIONS: Place the top part of the script above the HEAD tag. Place the bottom part with the link in the body of your webpage. Make sure you include the onLoad function in your BODY tag. DO NOT PLACE TWO BODY TAGS ON YOUR PAGE. FUNCTIONALITY: Works in both Netscape & IE. --> <SCRIPT LANGUAGE="JAVASCRIPT"> //Modified by CoffeeCup Software //This code is Copyright (c) 1998 CoffeeCup Software //All rights reserved. License is granted to a single user to //reuse this code on a personal or business Web Site. function time_arrived() { enter=new Date(); } function time_here() { exit=new Date(); time=(exit.getTime()-enter.getTime())/1000; time=Math.round(time); alert ("You have been here for " + time + " seconds. Getting tired?") } </SCRIPT> <!-- This should be above the HEAD tag --> <BODY onLoad='time_arrived()'> <CENTER> <FORM> <INPUT type="button" name="timehere" value="You have been here for..." onClick='time_here()'> </FORM> </CENTER> <!--End of How Long JavaScript -->
Status Bar Clock
نمايش ساعت در استاتوس بار
<!-- Start of Status Bar Clock --> <!-- This Script puts a digital clock in your status bar, very cool --> <!-- This section goes in between your head tags --> <script Language="JavaScript"> var timerID = null; var timerRunning = false; function stopclock (){ if(timerRunning) clearTimeout(timerID); timerRunning = false; } function showtime () { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds() var timeValue = "" + ((hours >12) ? hours -12 :hours) timeValue += ((minutes < 10) ? ":0" : ":") + minutes timeValue += ((seconds < 10) ? ":0" : ":") + seconds timeValue += (hours >= 12) ? " P.M." : " A.M." window.status = timeValue; timerID = setTimeout("showtime()",1000); timerRunning = true; } function coffeeclock () { stopclock(); showtime(); } </script> <!-- put this in your body tag --> <body onLoad="coffeeclock()"> <!-- put this in your document body --> <form name="clock" onSubmit="0"> <!-- End of Status Bar Clock -->
Display Time
نمايش زماني که ما به صفحه آمديم
<!-- Start of Display Time --> <!-- Displays the current system time to the visitor of your site --> <!-- Instructions: Just put the beginning of this code inside your pages '<head>' tags and the later part inside your pages '<body>' tags. --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <head> <script language="JavaScript"> <!-- var Temp; setClock(); function setClock() { CC_Time = ""; now = new Date(); var CurHour = now.getHours(); var CurMinute = now.getMinutes(); now = null; if( CurHour > 12 ) { CurHour = CurHour - 12; ampm = 1; } else ampm = 0; if( CurHour == 0 ) CurHour = 12; if( CurMinute < 10 ) CurMinute = "0" + CurMinute; CurHour = "<FONT SIZE=2><B>" + CurHour + ":" + CurMinute + "</B>"; if( ampm == 1 ) CurHour = CurHour + " P.M."; else CurHour = CurHour + " A.M."; Temp = CurHour; } function pathOnly (InString) { LastSlash=InString.lastIndexOf ('/', InString.length-1) OutString=InString.substring (0, LastSlash+1) return (OutString); } // --> </script> <body> <!-- Just insert the following code where you want the time to appear --> <script> document.write( Temp ); </script> <!-- End Insert -->
On / Off Clock
خاموش و روشن کردن ساعت
<!-- Start of On/Off Clock JavaScript --> <!-- This script will put a clock on --> <!-- your desktop that the user can turn on/off --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <BODY onload="TOfunc()"> <SCRIPT LANGUAGE="JavaScript"> var enabled = 0; function TOfunc() { TO = window.setTimeout( "TOfunc()", 1000 ); var today = new Date(); document.forms[0].elements[0].value = today.toString(); } </SCRIPT> <CENTER> <FORM> <CENTER> <input type="text" name="disp" value="" size=25 onFocus="this.blur()"><br> <input type="radio" name="rad" value="OFF" onClick="if( enabled ) { clearTimeout( TO ); enabled = 0; }"> OFF <input type="radio" name="rad" value="ON" checked onClick=" if( !enabled ) { TO = setTimeout( 'TOfunc()', 1000 ); enabled = 1; }" > ON<br> </CENTER> </FORM> <!-- End of On/Off Clock JavaScript -->
Stop Watch
تايمر
<!-- Start of StopWatch JavaScript --> <!-- A javascript stopwatch --> <!-- Instructions: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin var ms = 0; var state = 0; function startstop() { if (state == 0) { state = 1; then = new Date(); then.setTime(then.getTime() - ms); } else { state = 0; now = new Date(); ms = now.getTime() - then.getTime(); document.stpw.time.value = ms; } } function swreset() { state = 0; ms = 0; document.stpw.time.value = ms; } function display() { setTimeout("display();", 50); if (state == 1) {now = new Date(); ms = now.getTime() - then.getTime(); document.stpw.time.value = ms; } } // End --> </SCRIPT> <BODY onLoad="display()"> <CENTER> <FORM NAME="stpw"> Time: <INPUT TYPE="text" Name="time"> <INPUT TYPE="BUTTON" Name="ssbutton" VALUE="Start/Stop" onClick="startstop()"> <INPUT TYPE="BUTTON" NAME="reset" VALUE="Reset" onClick="swreset()"> </FORM> </CENTER> <!-- End of StopWatch JavaScript -->
Time Spent
محاسبهء زمان ورود به صفحه
<!-- End of Time Spent JavaScript --> <!-- This scripts tell your sites visitor how long they spent at the page. --> <!-- Instructions: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin startday = new Date(); clockStart = startday.getTime(); function initStopwatch() { var myTime = new Date(); return((myTime.getTime() - clockStart)/1000); } function getSecs() { var tSecs = Math.round(initStopwatch()); var iSecs = tSecs % 60; var iMins = Math.round((tSecs-30)/60); var sSecs ="" + ((iSecs > 9) ? iSecs : "0" + iSecs); var sMins ="" + ((iMins > 9) ? iMins : "0" + iMins); document.forms[0].timespent.value = sMins+":"+sSecs; window.setTimeout('getSecs()',1000); } // End --> </script> <BODY onLoad="window.setTimeout('getSecs()',1)"> <CENTER> <FORM> <FONT SIZE="2" FACE="Arial">Time spent here: </FONT><input size=5 name=timespent> </FORM> </CENTER> <!-- End of Time Spent JavaScript -->
E-Mail Form
امکان ارسال ايميل
<!-- Start of E-Mail Form JavaScript--> <!-- DESCRIPTION: This will send you an e-mail with whatever your visitor enters in the fields. INSTRUCTIONS: Place this entire script where you want the form to show up on the page. You can change the values (Name, E-mail, Phone, etc.) Just be sure to change that fields value in the script. See where is says, "document.ccform.name.value", that is for the input field "name". BE SURE TO CHANGE THE E-MAIL ADDRESS BELOW. Currently it's at 'you@yourprovider.com'. FUNCTIONALITY: Works in both Netscape and IE. ONLY WORKS IF THE VISITOR HAS THEIR E-MAIL SET UP ON THEIR BROWSER. --> <SCRIPT LANGUAGE=JavaScript> //Modified by CoffeeCup Software //This code is Copyright (c) 1998 CoffeeCup Software //All rights reserved. License is granted to a single user to //reuse this code on a personal or business Web Site. <!-- if (navigator.appVersion.lastIndexOf('Win') != -1) { dropline = "\r\n" } else { dropline = "\n" } function coffeemsg(form) { document.ccform.Message.value = ( ' ' + dropline + dropline + '-----CoffeeCup AutoMated E-Mail Form---START----- ' + dropline + dropline + dropline + 'Name : ' + document.ccform.name.value + dropline + 'Phone : ' + document.ccform.phone.value + dropline + 'Subject : ' + document.ccform.subject.value + dropline + 'E-mail : ' + document.ccform.email.value + dropline + 'Message: ' + document.ccform.message.value + dropline + dropline + '-----CoffeeCup AutoMated E-Mail Form----END------ ' + dropline + dropline + 'E-Mail Form JavaScript by:' + dropline + 'http://www.coffeecup.com' + dropline + dropline + dropline + ' FIELD VALUES: ' + dropline + ' ' + dropline ); } // --> </SCRIPT> <FORM name="ccform" method="post" action="mailto:you@yourprovider.com?subject=Message" enctype="text/plain"> <INPUT type=hidden name="Message"> <FONT FACE="VERDANA, ARIAL"><B>Name:</B></FONT><P> <INPUT type="text" size=25 name="name" onChange="coffeemsg()"> <P> <FONT FACE="VERDANA, ARIAL"><B>Phone:</B><P> <INPUT type="text" size=25 name="phone" onChange="coffeemsg()"> <P> <FONT FACE="VERDANA, ARIAL"><B>Email:</B></FONT><P> <INPUT type="text" size=25 name="email" onChange="coffeemsg()"> <P> <FONT FACE="VERDANA, ARIAL"><B>Subject:</B></FONT><P> <INPUT type="text" size=25 name="subject" onChange="coffeemsg()"> <P> <FONT FACE="VERDANA, ARIAL"><B>Message:</B></FONT><P> <TEXTAREA rows=5 cols=45 wrap="auto" name=message onChange="coffeemsg()">
Scrolling alert button
دکمه اي در حال حرکت
<!--This is a scrolling alert button. This example is for mail, but if you change the action = to a URL, it will also go to a site. Make sure to reflect the words on your scroll to match where you are taking them--> <form name="form2" action=mailto:saman_golestani@yahoo.com> <input type="submit" name="banner" VALUE=".......Submit......." onClick="alert('Here We go !')"> <br> </form> <script language="JavaScript"> // Modified by CoffeeCup Software var id,pause=0,position=0; function banner() { // variables declaration var i,k,msg=" IRAN-SUNS ...."; // increase msg k=(60/msg.length)+1; for(i=0;i<=k;i++) msg+=" "+msg; // show it to the window document.form2.banner.value=msg.substring(position,position+60); // set new position if(position++==msg.length) position=0; // repeat at entered speed id=setTimeout("banner()",150); } // end --> banner(); </script>
Calculator
ماشين حساب در سايت يا وبلاگ
<!-- Start of CoffeeCup Calculator Script --> <!-- A Simple Calculator --> <!-- Instructions: Just put this script anywhere on your webpage between the body tags and you will have a calculator for your visitors! --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <CENTER> <FORM name="Keypad" action=""> <TABLE> <B> <TABLE border=2 width=50 height=60 cellpadding=1 cellspacing=5> <TR> <TD colspan=3 align=middle> <input name="ReadOut" type="Text" size=24 value="0" width=100%> </TD> <TD </TD> <TD> <input name="btnClear" type="Button" value=" C " onclick="Clear()"> </TD> <TD><input name="btnClearEntry" type="Button" value=" CE " onclick="ClearEntry()"> </TD> </TR> <TR> <TD> <input name="btnSeven" type="Button" value=" 7 " onclick="NumPressed(7)"> </TD> <TD> <input name="btnEight" type="Button" value=" 8 " onclick="NumPressed(8)"> </TD> <TD> <input name="btnNine" type="Button" value=" 9 " onclick="NumPressed(9)"> </TD> <TD> </TD> <TD> <input name="btnNeg" type="Button" value=" +/- " onclick="Neg()"> </TD> <TD> <input name="btnPercent" type="Button" value=" % " onclick="Percent()"> </TD> </TR> <TR> <TD> <input name="btnFour" type="Button" value=" 4 " onclick="NumPressed(4)"> </TD> <TD> <input name="btnFive" type="Button" value=" 5 " onclick="NumPressed(5)"> </TD> <TD> <input name="btnSix" type="Button" value=" 6 " onclick="NumPressed(6)"> </TD> <TD> </TD> <TD align=middle><input name="btnPlus" type="Button" value=" + " onclick="Operation('+')"> </TD> <TD align=middle><input name="btnMinus" type="Button" value=" - " onclick="Operation('-')"> </TD> </TR> <TR> <TD> <input name="btnOne" type="Button" value=" 1 " onclick="NumPressed(1)"> </TD> <TD> <input name="btnTwo" type="Button" value=" 2 " onclick="NumPressed(2)"> </TD> <TD> <input name="btnThree" type="Button" value=" 3 " onclick="NumPressed(3)"> </TD> <TD> </TD> <TD align=middle><input name="btnMultiply" type="Button" value=" * " onclick="Operation('*')"> </TD> <TD align=middle><input name="btnDivide" type="Button" value=" / " onclick="Operation('/')"> </TD> </TR> <TR> <TD> <input name="btnZero" type="Button" value=" 0 " onclick="NumPressed(0)"> </TD> <TD> <input name="btnDecimal" type="Button" value=" . " onclick="Decimal()"> </TD> <TD colspan=3> </TD> <TD> <input name="btnEquals" type="Button" value=" = " onclick="Operation('=')"> </TD> </TR> </TABLE> </TABLE> </B> </FORM> </CENTER> <font face="Verdana, Arial, Helvetica" size=2> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var FKeyPad = document.Keypad; var Accumulate = 0; var FlagNewNum = false; var PendingOp = ""; function NumPressed (Num) { if (FlagNewNum) { FKeyPad.ReadOut.value = Num; FlagNewNum = false; } else { if (FKeyPad.ReadOut.value == "0") FKeyPad.ReadOut.value = Num; else FKeyPad.ReadOut.value += Num; } } function Operation (Op) { var Readout = FKeyPad.ReadOut.value; if (FlagNewNum && PendingOp != "="); else { FlagNewNum = true; if ( '+' == PendingOp ) Accumulate += parseFloat(Readout); else if ( '-' == PendingOp ) Accumulate -= parseFloat(Readout); else if ( '/' == PendingOp ) Accumulate /= parseFloat(Readout); else if ( '*' == PendingOp ) Accumulate *= parseFloat(Readout); else Accumulate = parseFloat(Readout); FKeyPad.ReadOut.value = Accumulate; PendingOp = Op; } } function Decimal () { var curReadOut = FKeyPad.ReadOut.value; if (FlagNewNum) { curReadOut = "0."; FlagNewNum = false; } else { if (curReadOut.indexOf(".") == -1) curReadOut += "."; } FKeyPad.ReadOut.value = curReadOut; } function ClearEntry () { FKeyPad.ReadOut.value = "0"; FlagNewNum = true; } function Clear () { Accumulate = 0; PendingOp = ""; ClearEntry(); } function Neg () { FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1; } function Percent () { FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accumulate); } // End --> </SCRIPT>
Fade In and Out
نمايش زيباي متن ها
<!-- Start of Fade In and Out JavaScript--> <!-- Place this entire script into a new webpage and then work off the example. Do not --> <!-- try to incorporate into an existing webpage, else you may disrupt the Script --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <HTML> <HEAD> <style type="text/css"> <!-- #fadeMe01 { position: absolute; visibility: visible; width: 410px } #fadeMe02 { position: absolute; visibility: visible; width: 400px } .content { font: 16pt Verdana, Arial, Helvetica; width: 400px; text-align: center } .content1 { font: 16pt Verdana, Arial, Helvetica; width: 400px; text-align: center } .small { font: 6pt Verdana, Arial, Helvetica; width: 400px; text-align: center } b { font-weight: bold } a { text-decoration : none } // --> </style> <script type="text/javascript" language="javascript"> <!-- var idme=908601; var convert = new Array(); var hexbase = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"); var value=0; var rgb; for (x=0; x<16; x++) for (y=0; y<16; y++) { convert[value] = hexbase[x] + hexbase[y]; value++; } var timerID = null, timerRunning = false; function stopClock(){ if(timerRunning) clearTimeout(timerID) timerRunning = false } var layers = document.layers; var style = document.all; var both = layers || style; if (layers) { layerRef = 'document.layers'; styleRef = ''; } if (style) { layerRef = 'document.all'; styleRef = '.style'; } function moveLayer(obj, topx, leftx) { if (both) { eval(layerRef + '["'+obj+'"]' + styleRef + '.top = topx'); eval(layerRef + '["'+obj+'"]' + styleRef + '.left = leftx'); } } var s1, s2, s3, s2r, s2g, s2b, smallest; function hexToDec(hex) { var value=0; while (true) { if (convert[value] == hex) break; value++; } return value; } function writeOn(obj, str) { if (layers) with (document[obj]) { document.open(); document.write(str); document.close(); } if (style) { eval(obj+'.innerHTML= str'); } } function changeColor(obj, str, rgb1, speed, counter) { if (counter < smallest) { stopClock(); if (layers) with (document[obj]) { document.open(); document.linkColor = rgb1; document.fgColor = rgb1; document.write(str); document.close(); } if (style) { eval(obj+'.document.linkColor= rgb1'); eval(obj+'.innerHTML= "<font color="+rgb1+">"+str+"<\/font>"'); // eval(layerRef + '["'+obj+'"]' + styleRef + '.color= rgb1'); } s2r+=s1; s2g+=s2; s2b+=s3; tempR = Math.round(s2r); tempG = Math.round(s2g); tempB = Math.round(s2b); if (tempR <= 0) tempR = 0; if (tempG <= 0) tempG = 0; if (tempB <= 0) tempB = 0; if (tempR >= 255) tempR = 255; if (tempG >= 255) tempG = 255; if (tempB >= 255) tempB = 255; rgb1 = convert[tempR] + convert[tempG] + convert[tempB]; counter++; timerID = setTimeout('changeColor("'+obj+'", "'+str+'", "'+rgb1+'", '+speed+', '+counter+')', speed); timerRunning = true; } } function fadeText(obj, str, rgb1, rgb2, speed, step) { var r1, g1, b1, r2, g2, b2; for (cnt=1; cnt<=2; cnt++) { eval('r'+cnt+' = hexToDec(rgb'+cnt+'.slice(0,2));'); eval('g'+cnt+' = hexToDec(rgb'+cnt+'.slice(2,4));'); eval('b'+cnt+' = hexToDec(rgb'+cnt+'.slice(4,6));'); } with (Math) { s2r = r1; s2g = g1; s2b = b1; s1 = abs(r1 - r2); s2 = abs(g1 - g2); s3 = abs(b1 - b2); if (s1 > s2 && s1 > s3) { smallest = s1; } else if (s2 > s1 && s2 > s3) { smallest = s2; } else { smallest = s3; } s1 = (s1 == 0) ? 0 : s1/smallest; s2 = (s2 == 0) ? 0 : s2/smallest; s3 = (s3 == 0) ? 0 : s3/smallest; s1*=step; s2*=step; s3*=step; if (r1 > r2) { s1 = -s1; } if (g1 > g2) { s2 = -s2; } if (b1 > b2) { s3 = -s3; } smallest= Math.round(smallest/step); } if (both) { changeColor(obj, str, rgb1, speed, 0); } else { document.write("Err. for some reason you tried viewing this page with a browser that doesn`t support javascript/CSS block support"); } } function getMid() { tvAgent = navigator.userAgent; if (layers) { maxX = innerWidth; maxY = innerHeight; } if (style) { maxX = document.body.clientWidth; maxY = document.body.clientHeight; } if (tvAgent.indexOf("WebTV") != -1) { maxX = 544; maxY = 378; } midX = maxX/2; midY = maxY/2; } function layout() { getMid(); moveLayer('fadeMe01', midY-50, midX-200); fadeText("fadeMe01", "<span class=content>Now Loading ...</span><div class=small>by eLF-bL4ck</div>", "000000", "CCCCCC", 10, 2); setTimeout('fadeText("fadeMe01", "<span class=content>Visit Our Sait ...</span><div class=small>. NoW .</div>", "CCCCCC", "000000", 10, 4)',8000); setTimeout('fadeText("fadeMe01", "<div class=small>. Just .</div><span class=content>WWW.IRANSUNS.COM</span>", "000000", "CCCCFF", 10, 2)',12000); setTimeout('fadeText("fadeMe01", "<div class=small>. Just .</div><span class=content>Www.IRANSUNS.cOM</span>", "CCCCFF", "000000", 10, 4)',20000); setTimeout('moveLayer("fadeMe01", midY-100, midX-200)',24000); setTimeout('moveLayer("fadeMe02", midY-60, midX-200)',24000); setTimeout('fadeText("fadeMe01", "<span class=content>This line could be Sentence Line 1.</span>", "000000", "CCCCFF", 10, 4)',26000); setTimeout('fadeText("fadeMe02", "<span class=content>Sentence Line 2.</span>", "000000", "9999FF", 10, 4)',32000); setTimeout('fadeText("fadeMe01", "<span class=content>Sentence Line 3.</span>", "CCCCFF", "FF0000", 10, 4)',36000); setTimeout('fadeText("fadeMe02", "<span class=content>Imagine the envy your friends will feel.</span>", "9999FF", "99FF33", 10, 4)',40000); setTimeout('fadeText("fadeMe02", "<span class=content>Sentence Line 5.</span>", "99FF33", "CCCCCC", 10, 4)',44000); setTimeout('fadeText("fadeMe02", "<span class=content>You can now make neat looking text displays.</span>", "CCCCCC", "000000", 10, 4)',48000); setTimeout('fadeText("fadeMe02", "<span class=small>Sentence Line 7.</div>", "000000", "CCCCCC", 10, 4)',52000); setTimeout('fadeText("fadeMe01", "<span class=content>-END-</div>", "000000", "FF0000", 10, 4)',57500); } // --> </script> </HEAD> <BODY BGCOLOR="#000000" text="#CCCCCC" link="#FFFFFF" vlink="#FFFFFF" onload="layout()"> <div id=fadeMe01></div> <div id=fadeMe02></div> <noscript> Silly! you'll need to have javascript enabled and you must have <a href="http://www.microsoft.com/">Internet Explorer 4</a> or <a href="http://developer.netscape.com">Netscape Navagitor 4</a> or <a href="http://www.iransuns.net">WebTV</a>(?) for this script to work. </noscript> </BODY> </HTML> <!-- End of Fade In and Out JavaScript-->
Fading Background
تغيير رنگ پشت صفحه بر اساس کد رنگ
<!-- Start Of Fading Background Script --> <!-- Instructions: Just put this script on your webpage and the background color will change with a display of what the current hex code is. --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <SCRIPT Language = "JavaScript"> start = new Date(); minstart = start.getMinutes() secstart = start.getSeconds() function brighter(){ var now = new Date(); var seconds = now.getSeconds(); var minutes = now.getMinutes(); var base = "00"; var color = 1000; var interval = 103; var sec= interval * (seconds - secstart); var min= 60 * interval * (minutes - minstart); var add= color + min + sec; total= base + add; if (add>=9999) {secstart = seconds; minstart = minutes} document.bgColor = total; setTimeout("brighter()", 1000); document.coffeeform.cc.value = total; } </script> </HEAD> <body onLoad = "brighter()" text="white" LINK="C0C0C0" VLINK="C0C0C0"> <form name="coffeeform"> <P>This is the hex code of the current background color <input name = "cc" type="text" size="7"> </form>
horizontal scroll - n
براي حرکت از راست به جپ اسکرول
<!-- DESCRIPTION: This will make your webpage slide to the right automatically upon loading of the webpage. INSTRUCTIONS: Place this script in the HEAD tags of your webpage. Place your message (WITHOUT ANY SPACES OR BREAKS) in the page below the BODY tag. Sentences must be continuous or the script will not work. (Example: Hi.....this....is....a...continuous...sentence..) If you find the script stopping before it finishes your sentence, change the H<=4000 variable to a larger number. FUNCTIONALITY: Works only in NETSCAPE. --> <HEAD> <SCRIPT Language="JavaScript"> //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 coffeeit(){ for (H=0; H<=3000; H++){ parent.scroll(H,0) } } //--> </SCRIPT> </HEAD> <BODY OnLoad="coffeeit()" BGCOLOR=#000000 TEXT=#FFFFFF LINK=#FF0000 VLINK=#FF0000 ALINK=#FF0000> <P><P><P><BR><BR><BR><P><P><P><BR><BR><BR><P><P><P><P><BR><BR><BR><P><P><P> <FONT SIZE=5 FACE=ARIAL BLACK>...................................................................This..Javascript..allows..the..user..to..slide..through..your..webpage.....You..can..also..end..it..with..a..<A HREF="http://www.iransuns.com/">IranSuns</A>..!</FONT>
Notepad
براي نمايش متن متحرک در نوت پد
<!-- A Script that types in a box that looks like notepad very cool The speed of the typing can be adjusted by raising or lowering the number in the setTimeout function. --> <script language="JavaScript"> function makeArray() { this.length = makeArray.arguments.length for (var i = 0; i < this.length; i++) this[i+1] = makeArray.arguments[i] } var fArray = new makeArray; fArray[0]="Message 1 goes here. " fArray[1]="Message 2 goes here. " fArray[2]="Message 3 goes here. " fArray[3]="Message 4 goes here. " var x = 1; var y = 0; var msg1 = fArray[y]; function newsFeed() { if (x==msg1.length+1) { for (var z=0; z < 7000; z++); y+=1; if (y > 3) y=0; document.form1.news2.value=' '; msg1 = fArray[y]; x=0; } document.form1.news2.value=msg1.substring(0,x); x+=1; setTimeout("newsFeed() ",1); } </script> <body bgcolor=teal link=goldenrod onLoad="newsFeed()"> <form name="form1"> <textarea wrap=physical rows=10 cols=25 name="news2">
Date Modification
اطلاعاتي در مورد صفحه
<!-- BORN ON DATE: Let your users know if your site has changed since their last visit --> <BODY> <CENTER> <TABLE border=2 cellspacing=0 cellpadding=3> <TR><TD bgcolor="#000044"> <FONT color="#4400ff" face=georgia,arial size=+1> <CENTER> <SCRIPT LANGUAGE="JavaScript"> <!-- document.write(document.title); //--> </SCRIPT> </TD></TR> <TR><TD bgcolor="#336699"> <FONT size=-1 color="#66ccff" face="trebuchet MS","arial"> <FONT color="#66ccff">Born on:</font> <!-- Put the page creation date, here. --> May 11, 1979 <BR> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function DeleteCookie(name) { var exp = new Date(); FixCookieDate (exp); exp.setTime (exp.getTime() - 1); var cval = GetCookie (name); if (cval != null) document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); } var cookie_date=new Date(document.lastModified); var expdate = new Date(); expdate.setTime(expdate.getTime()+(5*24*60*60*1000)); document.write("<Font color=66ccff>" + "Last updated: "+ "</font>" +document.lastModified); document.write(""); if (!(cookie_date == GetCookie("cookie_date"))){ SetCookie("cookie_date",cookie_date,expdate); document.write("<font color='#66ccff'><br>Site has changed since last visit!</font><br>"); } // End --> </SCRIPT> </FONT> </TD></TR> </TABLE> </CENTER>
Floating Menu
منوي قابل حرکت با موس
<!-- Floating Menu A Cool Floating Menu Script Great for remote controls --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function VersionCheck() { var x = navigator.appVersion; y = x.substring(0,4); if (y>=4) setVariables();moveOB(); } function setVariables() { if (navigator.appName == "Netscape") { h=".left=";v=".top=";dS="document.";sD=""; } else{ h=".pixelLeft=";v=".pixelTop=";dS="";sD=".style"; } objectX="object11" XX=-70; YY=-70; OB=11; } function setObject(a) { objectX="object"+a; OB=a; XX=eval("xpos"+a); YY=eval("ypos"+a); } function getObject() { if (isNav) document.captureEvents(Event.MOUSEMOVE); } function releaseObject() { if (isNav) document.releaseEvents(Event.MOUSEMOVE); check="no"; objectX="object11"; document.close(); } function moveOB() { eval(dS + objectX + sD + h + Xpos); eval(dS + objectX + sD + v + Ypos); } var isNav = (navigator.appName.indexOf("Netscape") !=-1); var isIE = (navigator.appName.indexOf("Microsoft") !=-1); nsValue=(document.layers); check="no"; function MoveHandler(e) { Xpos = (isIE) ? event.clientX : e.pageX; Ypos = (nsValue) ? e.pageY : event.clientY; if (check=="no") { diffX=XX-Xpos; diffY=YY-Ypos; check="yes"; if (objectX=="object11") check="no"; } Xpos+=diffX; Ypos+=diffY; if (OB=="1") xpos1=Xpos,ypos1=Ypos; moveOB(); } if (isNav) { document.captureEvents(Event.CLICK); document.captureEvents(Event.DBLCLICK); } xpos1=50; // make this the left pixel value for object1 below ypos1=50; // make this the top pixel value for object1 below xpos11 = -50; ypos11 = -50; Xpos=5; Ypos=5; document.onmousemove = MoveHandler; document.onclick = getObject; document.ondblclick = releaseObject; // End --> </script> </HEAD> <!-- Insert the onLoad in your body tag --> <BODY OnLoad="VersionCheck()"> <!-- Copy this code into the BODY of your HTML document --> <b>Click once on "Move Menu" to pick<br> it up and Double Click to drop</b> <br> <div id="object1" style="position:absolute; visibility:show; left:50px; top:50px; z-index:2"> <table border=1 cellpadding=5> <tr> <td bgcolor="#eeeeee"><a href="javascript:void(0)" onmousedown="setObject(1)">Move Menu</a></td> </tr> <tr> <td> <br> <A HREF="javascript:void(0)">Menu Item # 1</A><br> <A HREF="javascript:void(0)">Menu Item # 2</a><br> <A HREF="javascript:void(0)">Menu Item # 3</a> </td> </tr> </table> </div> <div id="object11" style="position:absolute; visibility:show; left:-70px; top:-70px; z-index:2"> </div>
How Old Is This Page
نشان دهندهء مدت به وجود آمدن صفحه
<!-- Page Age Script This script will display to your users how long in years, months, days your site has been active --> <SCRIPT LANGUAGE="JavaScript"> function DateEstablished(startmonth, startdate, startyear) { sdate=startdate; smonth=startmonth-1; syear=startyear; var DaysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31); today = new Date() var thisyear = today.getFullYear(); var thismonth = today.getMonth(); var thisdate = today.getDate(); mstart = new Date(syear,(smonth==12?1:smonth+1),1); days1 = (mstart - new Date(syear,smonth,sdate))/(24*60*60*1000)-1; mend = new Date(thisyear,thismonth,1); days2 = (new Date(thisyear,thismonth,thisdate) - mend)/(24*60*60*1000)+1; dayst = days1 + days2; if (dayst >= DaysInMonth[smonth]) { AddOneMonth = 1; dayst -= DaysInMonth[smonth]; } else AddOneMonth = 0; ydiff1 = thisyear-mstart.getFullYear(); mdiff1 = thismonth-mstart.getMonth()+AddOneMonth; if (mdiff1 >11) { mdiff1=0; ydiff1++; } if (mdiff1 < 0) { mdiff1 = mdiff1 + 12; ydiff1--; } temp = (ydiff1==0?"":(ydiff1==1?ydiff1+" year and ":ydiff1 + " years, ")); temp += (mdiff1==0?"0 months, and ":(mdiff1==1?mdiff1+" month, and ":mdiff1+" months, and ")); temp += (dayst==0?"no days":(dayst==1 ? " 1 day." : dayst + " days." )); return temp; } </script> <!-- Copy this into the BODY of your HTML document --> <SCRIPT LANGUAGE="JavaScript"> document.write("My Website has been in existence for "); document.write("<font color=red>"); document.write(DateEstablished(06,09,69)); // Enter the dates your site was created. day,month,year document.write("</font>"); </script>
Image Drag & Drop
تصاوير قابل حرکت با موس
<!-- Image Drag & Drop Your viewers can drag and drop images on your webpage --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> N = (document.all) ? 0 : 1; var ob; function MD(e) { if (N) { ob = document.layers[e.target.name]; X=e.x; Y=e.y; return false; } else { ob = event.srcElement.parentElement.style; X=event.offsetX; Y=event.offsetY; } } function MM(e) { if (ob) { if (N) { ob.moveTo((e.pageX-X), (e.pageY-Y)); } else { ob.pixelLeft = event.clientX-X + document.body.scrollLeft; ob.pixelTop = event.clientY-Y + document.body.scrollTop; return false; } } } function MU() { ob = null; } if (N) { document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP); } document.onmousedown = MD; document.onmousemove = MM; document.onmouseup = MU; // End --> </script> </HEAD> <!-- Copy this into body of your webpage --> <div id="s" style="position:absolute;left:50;top:300;"> <img src=file:///E:/Earth.gif name="s" width="32" height="32"> </div> <div id="d" style="position:absolute;left:50;top:350;"> <img src="file:///E:/Fish%20Tropical.gif" name="d" width="32" height="32"> </div> <div id="c" style="position:absolute;left:100;top:300;"> <img src=file:///E:/Butterfly.gif name="c" width="32" height="32"> </div> <div id="h" style="position:absolute;left:100;top:350;"> <img src="file:///E:/Foot%20Paw%20Print.gif" name="h" width="31" height="29"> </div>
Image Preview
نشان دهندهء تصاوير
<!-- Drop Down Image Preview 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function CoffeePreview(sel) { document.CoffeePreview.src = "" + sel.options[sel.selectedIndex].value; } function CoffeeShow(sel) { images = new Array(); images[1] = "1.jpg"; images[2] = "2.jpg"; images[3] = "3.jpg"; images[4] = "4.jpg"; images[5] = "5.jpg"; images[6] = "6.jpg"; window.location.href = images[sel.selectedIndex+1]; } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <center> <form name=previewselect> <select name=selbox size=1 onChange="CoffeePreview(this)"> <option value="1-small.jpg">Image #1 <option value="2-small.jpg">Image #2 <option value="3-small.jpg">Image #3 <option value="4-small.jpg">Image #4 <option value="5-small.jpg">Image #5 <option value="6-small.jpg">Image #6 </select> <p> <img name="preview" src="1-small.jpg" width=150 height=113 border=1> <p> <input type=button value="view Image" onclick="CoffeeShow(this.form.selbox)"> </form> </center>
Click Jump Link Box
منو کشويي لينک که با کليک بلافاصله وارد لينک مي شود
<!-- ClickJump LinkBox Change the VALUES to your links! --> <!-- When the User selects an item, it will automatically jump to that link. --> <CENTER> <FONT FACE="VERDANA, ARIAL">Select an item:</FONT><BR> <FORM> <SELECT NAME="clicklist" onChange="top.location.href=this.form.clicklist.options[this.form.clicklist.selectedIndex].value"> <OPTION selected> Click Here <OPTION VALUE="http://www.iransuns.com/">IRAN-SUNS <OPTION VALUE="http://www.hosting.iransuns.com">Hosting <OPTION VALUE="http://www.iransuns.com">Download Center <OPTION VALUE="http://www.iransuns.com">Upload Center </SELECT><P> </FORM> </CENTER>
Drop Down Links Script
منو کشويي لينک که پس از انتخاب و زدن دکمه وارد لينک مي شود
<!-- Start Of Drop Down Links Script --> <!-- Consolidate a bunch of links to a simple drop down menu --> <!-- Instructions: Just put this in your page where you want to display links. --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.webloger.5u.com --> <script language="JavaScript"> function CC_go(form) {var myindex=form.dest.selectedIndex window.open(form.dest.options[myindex].value, target="_parent", "toolbar=yes,scrollbars=yes,location=yes"); } </script> <form name="CC_LinkForm"> <select name="dest" SIZE=1> <option selected value="">Places to go <option value="http://www.iransuns.com/">IRAN-SUNS <option value="http://home.hosting.iransuns.com/">Hosting <option value="http://www.Download Center.com">Download </select> <P> <input type="button" value="Link Me!" onClick="CC_go(this.form)"> </form> <!-- End Of Drop Down Links Script -->
Drop Down Box Scroll
منو کشويي لينک که با اسکرول نيز وارد لينک مي شود
<!-- Start Of Drop Down Box Scroll Script --> <!-- When you make a selection from the list, all the choices scroll --> <!-- Instructions: Just put this script anywhere on your webpage where you want cool links. --> <!-- Does not display in IE --> <center> <SCRIPT LANGUAGE="JavaScript"> <!-- var sid="mitnamdliw_wildmantim"; function selectaplace(form) { var appname= navigator.appName; var appversion=parseInt(navigator.appVersion); if (appname == "Netscape" && appversion >= 3){ var formindex=form.select1.selectedIndex; var storage=form.select1.options[formindex].text; if (form.select1.options[formindex].value != "none") { var msg=storage+" You are now being teleported to -> "+storage; for (var spot=0;spot<msg.length-storage.length;spot++) { var x=msg.substring(spot,msg.length); form.select1.options[formindex].text=x; for(var d=0;d<150;d++) { }; } document.location=form.select1.options[formindex].value; form.select1[formindex].text=storage; } else { form.select1[formindex].text="Not a real option!"; for(var d=0;d<1250;d++) { }; form.select1[formindex].text=storage; } } else { var formindex=form.select1.selectedIndex; document.location=form.select1.options[formindex].value; } } function makeMyMenu() { document.write ('<form><select name="select1" onChange="selectaplace(this.form)" size=1>'); document.write ('<option value=http://www.iransuns.com>IRAN-SUNS'); document.write ('<option value=http://www.iransuns.com>Hosting'); document.write ('<option value=http://www.iransuns.com>Download Center'); document.write ('<option value=http://www.iransuns.com>Upload Center'); document.write ('<option value=http://www.iransuns.com>Learning'); document.write ('</select>'); document.write ('</form>'); } while(sid!="mitnamdliw_wildmantim"){}; makeMyMenu(); //--> </SCRIPT> </center> <!-- END OF SCRIPT --> <!/SCRIPT>
Link Message
نمايش لينک به صورتي زيبا
<!-- Start of Link Message Script --> <!-- This script give a quick message before exiting --> <!-- Instructions: Just put the top portion of this script after your meta tags and before the closing head tag. Put the second portion in the body of your page anywhere you wish the links to appear. To add more links, simply copy and paste one of the below examples and then make sure that the next number is corresponded. Thrn add the link name at the bottom of the script. --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <script language="JavaScript"> <!-- function CC_Message(){ if (document.msgform.msgselect.options[0].selected){ window.location.href = "http://www.iransuns.com";} else if (document.msgform.msgselect.options[1].selected) { window.location.href = "http://www.hosting.iransuns.com";} else if (document.msgform.msgselect.options[2].selected) { window.location.href = "http://www.iransuns.com";} else if (document.msgform.msgselect.options[3].selected) { window.location.href = "http://www.iransuns.com";} else if (document.msgform.msgselect.options[4].selected) { window.location.href = "http://www.iransuns.com";} return true; } function textValue(){ var msgInteger, msgString msgInteger=document.msgform.msgselect.selectedIndex msgString=document.msgform.msgselect.options[msgInteger].text document.msgform.msgtext.value = "Go to " + msgString +"!" } //--> </script> </head> <body> <form name="msgform"> <select name="msgselect" onChange="textValue()" multiple size="5"> <option>IRAN-SUNS <option>Hosting <option>Download Center <option>Upload Center <option>Learning </select> <br><p> <input type="button" name="msgbutton" value="Go!" onClick="CC_Message()"> <p> <input type="text" name="msgtext" value="" size="35" maxlength="35"> <p> </form> <!-- End of Link Message Script -->
Confirm
آمدن پيغام به هنگام ورود به صفحه
<!-- This allows the user confirm entering the page --> <SCRIPT LANGUAGE="JavaScript"><!-- //modified by Coffeecup.com function Info() { if (!confirm("Press < OK > to enter . Press < Cancel > if you want to change your mind")) history.go(-1);return " " } document.writeln(Info())<!--End--></script>
No Underlined Links
از بين بردن آندرلاين از زير لينکها
<!-- Start Of No Underlined Links Script --> <!-- This script takes the underline off of links. --> <!-- Instructions: Just put this script anywhere on your webpage before links that you wish not to have underlined. --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <STYLE TYPE="text/css"> <!-- A { text-decoration: none; } A:link { color: #000099; } A:visited { color: #000099; } --> </STYLE> <!-- End Of No Underlined Links Script -->
Link Description Box
توضيحات لينک و اجراي آن
<!-- Start of Link Description Box JavaScript --> <!-- Instructions: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function CC_Display(selection) { if (selection=="1") { document.form.info.value="Description Description*Description"; document.form.go.value="http://www.webloger.5u.com"; } else if(selection=="2") { document.form.info.value="Description*Description Description"; document.form.go.value="http://www.webloger.5u.com"; } else if(selection=="3") { document.form.info.value="Description Description*Description"; document.form.go.value="http://www.webloger.5u.com"; } else if(selection=="4") { document.form.info.value="Description*Description Description"; document.form.go.value="http://www.webloger.5u.com"; } else if(selection=="5") { document.form.info.value="Description Description*Description"; document.form.go.value="http://www.webloger.5u.com"; } else if(selection=="6") { document.form.info.value="Description*Description Description"; document.form.go.value="http://www.webloger.5u.com"; } else { document.form.info.value = "Description Description*Description"; document.form.go.value="http://www.webloger.5u.com"; } } function moreInfo() { var page=document.form.go.value; window.location=page; } // End --> </script> </HEAD> <!-- STEP TWO: Add the last coding into the BODY of your HTML document --> <BODY> <center> <form name=form> <table border=0 width=400> <tr> <td align=center><a href="javascript:CC_Display(1);">LINK</a><br></td> <td align=center><a href="javascript:CC_Display(2);">LINK</a><br></td> <td align=center><a href="javascript:CC_Display(3);">LINK</a><br></td> </tr> <tr> <td align=center><a href="javascript:CC_Display(4);">LINK</a><br></td> <td align=center><a href="javascript:CC_Display(5);">LINK</a><br></td> <td align=center><a href="javascript:CC_Display(6);">LINK</a><br></td> </tr> <tr> <td colspan=3 align=center> <textarea name=info rows=2 cols=40 wrap=virtual>Click a topic above for more info!
Link Without Click
اجراي لينک با عبور موس از روي آن در پنجره جديد
<!-- DESCRIPTION: This will make the browser jump to the page of your choice once the user puts the mouse over the link. INSTRUCTIONS: Place this code in your webpage. Use the model given to modify your own links. Can be used with an Image or simply use text. FUNCTIONALITY: Works in both Netscape & IE. //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. --> <CENTER> <a href="http://www.iransuns.com/" target=main onmouseover="window.open ('http://www.iransuns.com/');" style="text-decoration: none"><FONT SIZE=7 FACE=ARIAL COLOR=#804000> .;: IRANSUNS.com :;.</FONT></a></CENTER><P>
Small Navigation Window
باز شدن پنجره اي کوچک همراه با پنجرهء اصلي
<HEAD> <!-- DESCRIPTION: This will make a small Navigation Window in which you can place links to different pages. INSTRUCTIONS: Place this script in the HEAD tags of your webpage. FUNCTIONALITY: Works in both Netscape & IE. --> <SCRIPT LANGUAGE="JavaScript"> //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. <!-- coffeeWin=window.open("","coffeeWin","toolbar=no,width=200,height=250,directories=no,menubar=no,SCROLLBARS=no"); coffeeWin.document.write("<HTML>"); coffeeWin.document.write("<HEAD>"); coffeeWin.document.write("</HEAD>"); coffeeWin.document.write("<BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#0000FF VLINK=#0000FF>") coffeeWin.document.write("<CENTER>") coffeeWin.document.write("<FONT FACE=VERDANA,ARIAL SIZE=2>"); coffeeWin.document.write("<B>"); coffeeWin.document.write("<FONT SIZE=3>Navigation Window</FONT>"); coffeeWin.document.write("<BR><HR WIDTH=180><BR><P>"); coffeeWin.document.write("<A HREF=http://www.iransuns.com TARGET=MAIN>IRAN-SUNS</A>"); coffeeWin.document.write("<P>"); coffeeWin.document.write("<A HREF=http://www.iransuns.com TARGET=MAIN>Download</A>"); coffeeWin.document.write("<P>"); coffeeWin.document.write("<A HREF=http://www.iransuns.com TARGET=MAIN>Upload</A>"); coffeeWin.document.write("<P>"); coffeeWin.document.write("<A HREF=http://www.iransuns.com TARGET=MAIN>Learn</A>"); coffeeWin.document.write("<P>"); coffeeWin.document.write("</B>"); coffeeWin.document.write("</FONT>"); coffeeWin.document.write("</BODY>"); coffeeWin.document.write("</HTML>"); //--> </SCRIPT> </HEAD>
Hover link
اجراي لينک با عبور موس از روي آن در همان پنجره
<!-- Hover link Use this script so that when the user's mouse is over the link, it will go to the url provided. --> <font color="#993399" face="Tahoma" size="2"> <a onmouseover="parent.location='http://www.iransuns.com'" style="text-decoration: none; font-weight: 700">IRAN-SUNS</A></font>
Instant Popup s
با نگاه داشتن موس بر روي لينک توضيحات به صورت يک پنجرهء جديد ظاهر مي شود
<!-- Instant Popups This script creates popsups when your mouse is over the link, then closes them when the mouse is not on the link --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> var hmsg = new Array(); hmsg["home"] = new coffeehelp( "Home Page", "fancyheader", "plain", "Clicking here will take you to the CoffeeCup Software home page."); hmsg["help"] = new coffeehelp( "", "", "bold", "Click here if you need help with your software"); hmsg["products"] = new coffeehelp( "CoffeeCup Software Products", "h2", "italics", "Download the Coolest Web Tools on the Net"); hmsg["order"] = new coffeehelp( "", "", "", "Buy CoffeeCup Software!"); var myPopup = new helpbox("myPopup", hmsg, 275, 175, "#ffffee"); function coffeehelp(header, hstyle, mstyle, message) { this.DEFAULTHSTYLE = "plain"; this.DEFAULTMSTYLE = "plain"; this.header = header; if (hstyle) this.hstyle = hstyle; else this.hstyle = this.DEFAULTHSTYLE; this.message = message; if (mstyle) this.mstyle = mstyle; else this.mstyle = this.DEFAULTMSTYLE; return this; } new coffeehelp(); coffeehelp.prototype.show = show; function show() { var H = "<FONT FACE='arial'>" + this.header + "</FONT>"; if (this.hstyle == "h1") H = "<H1>" + H + "</H1>"; else if (this.hstyle == "h2") H = "<H2>" + H + "</H2>"; else if (this.hstyle == "h3") H = "<H3>" + H + "</H3>"; else if (this.hstyle == "h4") H = "<H4>" + H + "</H4>"; if (this.hstyle == "fancyheader") H = "<table width='75%'>" + "<tr><td bgcolor='#6060ff' align='center' valign='center'>" + "<H1><FONT COLOR='white'>" + H + "</FONT></H1>" + "</td></tr></table>"; else if (this.hstyle == "italics") H = "<I>" + H + "</I>"; var M = "<FONT FACE='arial'>" + this.message + "</FONT>"; if (this.mstyle == "plain") {} if (this.mstyle == "italics") M = M.italics(); else if (this.mstyle == "bold") M = M.bold(); var htmlpage = ""; if (this.hstyle.indexOf("header")>=0) htmlpage = H + M; else htmlpage = H + "<BR>" + M; return htmlpage; } function helpbox(name, hm, width, height, bgcolor) { this.name = name; this.helpmessage = hm; this.timerHandle = null; this.windowHandle = null; this.DEFAULTWIDTH = 250; this.DEFAULTHEIGHT = 150; this.DEFAULTBGCOLOR = "#ffffcc"; this.POPUPDELAY = 100; if (width) this.width = width; else this.width = this.DEFAULTWIDTH; if (height) this.height = height; else this.height = this.DEFAULTHEIGHT; if (bgcolor) this.bgcolor = bgcolor; else this.bgcolor = this.DEFAULTBGCOLOR; return this; } function startHelp(msgindex) { var cmdstr="top." + this.name + ".showHelp('" + msgindex + "')"; this.timerHandle = setTimeout(cmdstr, this.POPUPDELAY); } function showHelp(msgindex) { if (!this.windowHandle || !this.windowHandle.name || this.windowHandle.name=="") this.windowHandle = window.open( "", "subWindow", "toolbar=no," + "location=no," + "directories=no," + "status=no," + "menubar=no," + "scrollbars=no," + "resizable=no," + "width=" + this.width + "," + "height=" + this.height ); else this.windowHandle.focus(); this.windowHandle.document.open(); var to_page = "<HTML>\n" + "<BODY BGCOLOR='" + this.bgcolor + "'><P>" + this.helpmessage[msgindex].show() + "</BODY></HTML>\n"; this.windowHandle.document.write(to_page); this.windowHandle.document.close(); } function clearHelp() { clearTimeout(this.timerHandle); if (this.windowHandle && this.windowHandle.name) { this.windowHandle.close(); this.windowHandle=null; } } new helpbox(); helpbox.prototype.startHelp = startHelp; helpbox.prototype.showHelp = showHelp; helpbox.prototype.clearHelp = clearHelp; // End --> </script> </HEAD> <!-- Copy into the BODY of your HTML --> <BODY> <a href="http://www.iransuns.com/" onMouseOver="myPopup.startHelp('home')" onMouseOut="myPopup.clearHelp()">IRAN-SUNS</a><br> <br> <a href="http://www.iransuns.com/" onMouseOver="myPopup.startHelp('help')" onMouseOut="myPopup.clearHelp()">Hosting ( LINK 2 )</a><br> <br> <a href="http://www.iransuns.com/" onMouseOver="myPopup.startHelp('products')" onMouseOut="myPopup.clearHelp()">Download ( LINK 3 )</a><br> <br> <a href="http://www.iransuns.com/" onMouseOver="myPopup.startHelp('order')" onMouseOut="myPopup.clearHelp()">Upload ( LINK 4 )</a><br> <br>
Random alert message
پيغام هاي پشت سر هم
<!-- DESCRIPTION: This will create a random alert message of any kind. Shown here in HTML Tags. You can replace the tags with phrases, help tips, anything that can be randomly diplayed. INSTRUCTIONS: Place this script in the BODY of your webpage. Change the VALUE to change the name on the Button. Change the HTML Tags to whatever variable you wish to have randomly displayed. FUNCTIONALITY: Works in both Netscape & IE. //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. --> <FORM> <INPUT TYPE="button" NAME="coffee" VALUE="HTML TAGS" onClick="randomMessage()"> </FORM> <SCRIPT LANGUAGE="JavaScript"> <!-- function randomMessage() { var cc = new Array(30) cc[0] = "<BODY>" cc[1] = "<HTML>" cc[2] = "<HEAD>" cc[3] = "<TITLE>" cc[4] = "<HR>" cc[5] = "<IMG SRC=>" cc[6] = "<B>" cc[7] = "<U>" cc[8] = "<UL>" cc[9] = "<OL>" cc[10] = "<BODY>" cc[11] = "<HTML>" cc[12] = "<HEAD>" cc[13] = "<TITLE>" cc[14] = "<HR>" cc[15] = "<IMG SRC=>" cc[16] = "<B>" cc[17] = "<U>" cc[18] = "<UL>" cc[19] = "<OL>" cc[20] = "<BODY>" cc[21] = "<HTML>" cc[22] = "<HEAD>" cc[23] = "<TITLE>" cc[24] = "<HR>" cc[25] = "<IMG SRC=>" cc[26] = "<B>" cc[27] = "<U>" cc[28] = "<UL>" cc[29] = "<OL>" var now = new Date() var sec = now.getSeconds() alert("HTML TAG:\r" + cc[sec % 30]) } //--> </SCRIPT>
' Your Message Here ' in the status bar
متن شما به صورت متحرک در استاتوس بار نمايش داده مي شود
<!-- This scrolls ' Your Message Here ' in the status bar --> <SCRIPT LANGUAGE="JavaScript"> //Modified by Coffeecup.com function infoscroll(seed,looped) { var text1 = " Your Text Here "; var text2 = " and more here.............. "; var msg=text1+text2; var putout = " "; var c = 1; if (looped > 10) { window.status="<Thanks !>"; } else if (seed > 100) { seed--; var cmd="infoscroll(" + seed + "," + looped + ")"; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 100 && seed > 0) { for (c=0 ; c < seed ; c++) { putout+=" "; } putout+=msg.substring(0,100-seed); seed--; var cmd="infoscroll(" + seed + "," + looped + ")"; window.status=putout; timerTwo=window.setTimeout(cmd,100); } else if (seed <= 0) { if (-seed < msg.length) { putout+=msg.substring(-seed,msg.length); seed--; var cmd="infoscroll(" + seed + "," + looped + ")"; window.status=putout; timerTwo=window.setTimeout(cmd,100); // 100 } else { window.status=" "; looped += 1; var cmd = "infoscroll(100," + looped + ")"; timerTwo=window.setTimeout(cmd,75); // 75 } } } // --> <!-- infoscroll(100,1) // --> </SCRIPT>
با نگاه داشتن موس بر روي تصوير متن شما در استاتوس بار ظاهر مي شود
<!-- This displays 'Your Message Here' in the status bar when the mouse --> <!-- pointer is over the 'Put Image Here' image --> <CENTER> <A HREF="URL" onMouseOver="window.status='Your Message Here'; return true" onMouseOut="window.status=''"> <P><IMG SRC="Put Image Here"></A> </CENTER>
Popup on Button Click
با کليک بر روي دکمه ها پنجرهء توضيحات ظاهر مي شود
<HTML> <HEAD> <!--START OF PopUp on Button Click--> <!-This script will give you 4 buttons that display pop up windows when clicked. --> <!-- Instructions: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <SCRIPT LANGUAGE="JavaScript"> function AlertCC(label, msg) { var cc1 = "<TITLE>Window Title</TITLE>" + "<BODY BGCOLOR='FFFFFF'><TABLE BORDER=0><TR>" + "<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"+ "<FONT SIZE=4 FACE=ARIAL>" var cc2 = "<FONT COLOR='FF0000'><B>"+label+"</B></FONT><BR><P>" var cc3 = "</TD><TD WIDTH=10%> </TD></TR><TR><TD> </TD>"+ "<TD VALIGN=BOTTOM ALIGN=RIGHT>"+ "<FORM><INPUT TYPE='BUTTON' VALUE='Close Window'" + "onClick='self.close()'>" + "</FORM></TD></TR></TABLE></BODY>" popup = window.open("","popDialog","height=280,width=400,scrollbars=no") popup.document.write(cc1+cc2+msg+cc3) popup.document.close() } function ccalert1() { AlertCC('Alert One', 'This script will let you place information about your product or topic of choice.') } function ccalert2() { AlertCC('Alert Two', 'This script will let you place information about your product or topic of choice.') } function ccalert3() { AlertCC('Alert Three', 'This script will let you place information about your product or topic of choice.') } function ccalert4() { AlertCC('Alert Four', 'This script will let you place information about your product or topic of choice.') } </SCRIPT> </HEAD> <BODY> <CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert One ]" onClick="ccalert1()"></FORM></CENTER><p> <CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert Two ]" onClick="ccalert2()"></FORM></CENTER><p> <CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert Three ]" onClick="ccalert3()"></FORM></CENTER><p> <CENTER><FORM><INPUT TYPE="BUTTON" VALUE="[ Alert Four ]" onClick="ccalert4()"></FORM></CENTER><p> <!-- END OF SCRIPT -->
Good Bye
آمدن پيغام به هنگام خروج از صفحه
<!-- DESCRIPTION: This will cause an elert message before your visitor leaves (OR reloads) your page. INSTRUCTIONS: Place this tag where your BODY tag is. Make changes to attributes (TEXT, LINK, VLINK, BGCOLOR, etc.) as necessary. FUNCTIONALITY: Works in both Netscape and IE. //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. --> <BODY onUnload="window.alert(' Good Bye ')"> </BODY>
Good Night
با کليک بر روي لينک پشت صفحه سياه مي شود
<!-- Start Of Good Night Script --> <!-- Instructions: This script is a good example of how to change the background color of your page via the click of a button. --> <!-- Script supplied with CoffeeCup HTML Editor --> <!-- www.coffeecup.com --> <FORM> <input type="button" value="Good Night" onClick="document.bgColor = 'black'" onClick="alert('Black')"> </FORM> <!-- End Of Good Night Script -->
تاريخ هجري شمسي
<head> <meta name="link" content="http://Theme.blogfa.com"> <META content="FrontPage.Editor.Document" name=ProgId> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></HEAD> <TITLE>تاريخ هجري شمسي</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT> function showdate() { week= new Array("يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنج شنبه","جمعه","شنبه") months = new Array("فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند"); a = new Date(); d= a.getDay(); day= a.getDate(); month = a.getMonth()+1; year= a.getYear(); if (year== 0){year=2000;} if (year<100){year +=1900;} y=1; for(i=0;i<3000;i+=4) { if (year==i) {y=2;} } for(i=1;i<3000;i+=4) { if (year==i) {y=3;} } if (y==1) { year -= ( (month < 3) || ((month == 3) && (day < 21)) )? 622:621; switch (month) { case 1: (day<21)? (month=10, day+=10):(month=11, day-=20); break; case 2: (day<20)? (month=11, day+=11):(month=12, day-=19); break; case 3: (day<21)? (month=12, day+=9):(month=1, day-=20); break; case 4: (day<21)? (month=1, day+=11):(month=2, day-=20); break; case 5: case 6: (day<22)? (month-=3, day+=10):(month-=2, day-=21); break; case 7: case 8: case 9: (day<23)? (month-=3, day+=9):(month-=2, day-=22); break; case 10:(day<23)? (month=7, day+=8):(month=8, day-=22); break; case 11: case 12:(day<22)? (month-=3, day+=9):(month-=2, day-=21); break; default: break; } } if (y==2) { year -= ( (month < 3) || ((month == 3) && (day < 20)) )? 622:621; switch (month) { case 1: (day<21)? (month=10, day+=10):(month=11, day-=20); break; case 2: (day<20)? (month=11, day+=11):(month=12, day-=19); break; case 3: (day<20)? (month=12, day+=10):(month=1, day-=19); break; case 4: (day<20)? (month=1, day+=12):(month=2, day-=19); break; case 5: (day<21)? (month=2, day+=11):(month=3, day-=20); break; case 6: (day<21)? (month=3, day+=11):(month=4, day-=20); break; case 7: (day<22)? (month=4, day+=10):(month=5, day-=21); break; case 8: (day<22)? (month=5, day+=10):(month=6, day-=21); break; case 9: (day<22)? (month=6, day+=10):(month=7, day-=21); break; case 10:(day<22)? (month=7, day+=9):(month=8, day-=21); break; case 11:(day<21)? (month=8, day+=10):(month=9, day-=20); break; case 12:(day<21)? (month=9, day+=10):(month=10, day-=20); break; default: break; } } if (y==3) { year -= ( (month < 3) || ((month == 3) && (day < 21)) )? 622:621; switch (month) { case 1: (day<20)? (month=10, day+=11):(month=11, day-=19); break; case 2: (day<19)? (month=11, day+=12):(month=12, day-=18); break; case 3: (day<21)? (month=12, day+=10):(month=1, day-=20); break; case 4: (day<21)? (month=1, day+=11):(month=2, day-=20); break; case 5: case 6: (day<22)? (month-=3, day+=10):(month-=2, day-=21); break; case 7: case 8: case 9: (day<23)? (month-=3, day+=9):(month-=2, day-=22); break; case 10:(day<23)? (month=7, day+=8):(month=8, day-=22); break; case 11: case 12:(day<22)? (month-=3, day+=9):(month-=2, day-=21); break; default: break; } } document.write(week[d]+" "+day+" "+months[month-1]+" "+ year); } </SCRIPT> </HEAD> <BODY> TABLE align="center"><TR><TD> <FONT face=tahoma size="2" color="#000000"> <SCRIPT>showdate()</SCRIPT> </FONT> </TD></TR></TABLE> </BODY> </HTML>
تقويم ميلادي
<center> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin monthnames = new Array( "January", "Februrary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "Decemeber"); var linkcount=0; function addlink(month, day, href) { var entry = new Array(3); entry[0] = month; entry[1] = day; entry[2] = href; this[linkcount++] = entry; } Array.prototype.addlink = addlink; linkdays = new Array(); monthdays = new Array(12); monthdays[0]=31; monthdays[1]=28; monthdays[2]=31; monthdays[3]=30; monthdays[4]=31; monthdays[5]=30; monthdays[6]=31; monthdays[7]=31; monthdays[8]=30; monthdays[9]=31; monthdays[10]=30; monthdays[11]=31; todayDate=new Date(); thisday=todayDate.getDay(); thismonth=todayDate.getMonth(); thisdate=todayDate.getDate(); thisyear=todayDate.getYear(); thisyear = thisyear % 100; thisyear = ((thisyear < 50) ? (2000 + thisyear) : (1900 + thisyear)); if (((thisyear % 4 == 0) && !(thisyear % 100 == 0)) ||(thisyear % 400 == 0)) monthdays[1]++; startspaces=thisdate; while (startspaces > 7) startspaces-=7; startspaces = thisday - startspaces + 1; if (startspaces < 0) startspaces+=7; document.write("<table border=2 bgcolor=white "); document.write("bordercolor=black><font color=black>"); document.write("<tr><td colspan=7><center><strong>" + monthnames[thismonth] + " " + thisyear + "</strong></center></font></td></tr>"); document.write("<tr>"); document.write("<td align=center>Su</td>"); document.write("<td align=center>M</td>"); document.write("<td align=center>Tu</td>"); document.write("<td align=center>W</td>"); document.write("<td align=center>Th</td>"); document.write("<td align=center>F</td>"); document.write("<td align=center>Sa</td>"); document.write("</tr>"); document.write("<tr>"); for (s=0;s<startspaces;s++) { document.write("<td> </td>"); } count=1; while (count <= monthdays[thismonth]) { for (b = startspaces;b<7;b++) { linktrue=false; document.write("<td>"); for (c=0;c<linkdays.length;c++) { if (linkdays[c] != null) { if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) { document.write("<a href=\"" + linkdays[c][2] + "\">"); linktrue=true; } } } if (count==thisdate) { document.write("<font color='FF0000'><strong>"); } if (count <= monthdays[thismonth]) { document.write(count); } else { document.write(" "); } if (count==thisdate) { document.write("</strong></font>"); } if (linktrue) document.write("</a>"); document.write("</td>"); count++; } document.write("</tr>"); document.write("<tr>"); startspaces=0; } document.write("</table></p>"); // End --> </SCRIPT> </CENTER>
<body> <STYLE type=text/css>#supertext {LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px} </STYLE> <SCRIPT language=JavaScript1.2> var thecontent='<h2><font color="#FF0000">Welcome To My Blog</font></h2>' var hidetimer=''; var BallSpeed = 3; var contentWidth; var contentHeight; var maxBallSpeed = 50; var xMax; var yMax; var xPos = 0; var yPos = 0; var xDir = 'right'; var yDir = 'down'; var superballRunning = true; var tempBallSpeed; var currentBallSrc; var newXDir; var newYDir; function initializeBall() { if (document.all) { xMax = document.body.clientWidth yMax = document.body.clientHeight document.all("supertext").style.visibility = "visible"; contentWidth=supertext.offsetWidth contentHeight=supertext.offsetHeight } else if (document.layers) { xMax = window.innerWidth; yMax = window.innerHeight; contentWidth=document.supertext.document.width contentHeight=document.supertext.document.height document.layers["supertext"].visibility = "show"; } setTimeout('moveBall()',400); if (hidetimer!='') setTimeout("hidetext()",hidetimer) } function moveBall() { if (superballRunning == true) { calculatePosition(); if (document.all) { document.all("supertext").style.left = xPos + document.body.scrollLeft; document.all("supertext").style.top = yPos + document.body.scrollTop; } else if (document.layers) { document.layers["supertext"].left = xPos + pageXOffset; document.layers["supertext"].top = yPos + pageYOffset; } animatetext=setTimeout('moveBall()',20); } } function calculatePosition() { if (xDir == "right") { if (xPos > (xMax - contentWidth - BallSpeed)) { xDir = "left"; } } else if (xDir == "left") { if (xPos < (0 + BallSpeed)) { xDir = "right"; } } if (yDir == "down") { if (yPos > (yMax - contentHeight - BallSpeed)) { yDir = "up"; } } else if (yDir == "up") { if (yPos < (0 + BallSpeed)) { yDir = "down"; } } if (xDir == "right") { xPos = xPos + BallSpeed; } else if (xDir == "left") { xPos = xPos - BallSpeed; } else { xPos = xPos; } if (yDir == "down") { yPos = yPos + BallSpeed; } else if (yDir == "up") { yPos = yPos - BallSpeed; } else { yPos = yPos; } } function hidetext(){ if (document.all) supertext.style.visibility="hidden" else if (document.layers) document.supertext.visibility="hide" clearTimeout(animatetext) } if (document.all||document.layers){ document.write('<span id="supertext"><nobr>'+thecontent+'</nobr></span>') window.onload = initializeBall; window.onresize = new Function("window.location.reload()"); } </SCRIPT> </body>
Save The Page
دستور ذخيره كردن صفحه
<script> function mo_save () {window.document.execCommand('SaveAs')}</script> <a href="javascript:mo_save()" class="mainlevel">ذخيره كردن صفحه</a>
Yahoo! Mesenger
نمايش وضعيت ياهو مسنجر
<a href="ymsgr:sendim?YOUR YAHOOID"> <img src="http://opi.yahoo.com/online?u=YOUR YAHOOID&m=g&t=0" border="0"></a>
Farsi Date
نمايش تاريخ امروز به صورت فارسي
<script lang="javascript" src="http://www.hamedbanaei.com/services/writetehrantime.aspx"></script>
<script language="javascript" src="http://www.fastusersonline.com/?sitename=<-BlogUrl->">
<SCRIPT src="http://fastwebcounter.com/secure.php?s=<-BlogUrl->"></SCRIPT>
View Times For Member
نمايش تعداد بازديدهاي هر كاربر
<SCRIPT language="Javascript">document.write("" + visits + "بار")</SCRIPT>
Page 1 Page 2
? Copy Right 2005-2006 - This Java-Packet Done By eLF - bL4Ck