سلام به شما كاربر گرامی امیدوارم در این وبلاگ دقایقی خوبی را سپری كنید . برای آگاهی از امكانات این وبلاگ خواهشمندم كه تا آخر صفحه این وبلاگ را مشاهده نمایید www.CallCom.isub.ir  در این وبلاگ سعی شده كه هر هفته از موضوعات مختلف , مطالب جدید در اختیار شما عزیزان قرار گیرد www.CallCom.isub.ir تشكر و قدرانی : از سایت P30Donwnlod و www.CallCom.isub.ir Donlod.com .
با سلام
در این
قسمت شما می توانید بهترین از بهترینهای کدهای جاوا اسکریپت را كپی
كنید.
این کدهای
جاوا اسکریپت بسیار قوی و زیبا هستند در دیدن آنها شک نکنید.
جاوا
اسکریپت یکی از بهترین و قوی ترین زبانهای تحت وب می باشد که نیازی به
آموزش خاصی ندارد فقط یک نکته
دارد
که شما باید کمی با زبان اچ تی ام ال آشنایی داشته باشد
نکته ی
خیلی مهم
کدهایی را که
می خواهید استفاده کنید بین تگ بادی کپی کنید برای وبلاگ نویسان در قسمت
ویرایش قالب یا کد وارد کنید
1-
کد نمایش پیغام
با کلیک بر روی یک دكمه
2- آدرس وبلاگ
خودتون را بنویسید
www.Your
WEB Name تعداد
نفرات آنلاین
Oneline users :
کدهای خفن جاوا اسکریپت
3- كد ساعت های زنده دنیا
New Page 2
Local time
London GMT
Rome
Bangkok
Hong Kong
Tokyo
Sydney
Fiji
Hawaii
San Francisco
New York
Buenos Aires
This free script provided by
webloger site
4- كد رقص متن در استاتوس بار 1
********************************************************
5 -
برای گذاشتن برف کد زیر رو قرار بدید
<!-- www.digitalkeyvan.com -->
<style>
.drop {
font-size: 20px; filter: flipV(), flipH(); width: 3px; color: blue; position: absolute}
</style>
<script language="javascript">
snow = true; // false-rain; true-snow
snowsym = " * " //These are the symbols for each
rainsym = " ' " //You can put images here.
howmany = 20 //How many drops/snowflakes?
if(snow){sym = snowsym; speed=1; angle=10; drops=howmany}
else{sym = rainsym; speed=50; drops=howmany; angle=6}
movex = -speed/angle; movey = speed; count = 0;
function moverain(){
for(move = 0; move < drops; move++){
xx[move]+=movex; yy[move]+=mv[move];
hmm = Math.round(Math.random()*1);
if(xx[move] < 0){xx[move] = maxx+10;}
if(yy[move] > maxy){yy[move] = 10;}
drop[move].left = xx[move]
drop[move].top = yy[move]+document.body.scrollTop;
}setTimeout('moverain()','1')}
if (document.all){
drop = new Array(); xx = new Array(); yy = new Array(); mv = new Array()
ly = "document.all[\'"; st = "\'].style"
for(make = 0; make < drops; make++){
document.write('<div id="drop'+make+'" class=drop>'+sym+'</div>');
drop[make] = eval(ly+'drop'+make+st);
maxx = document.body.clientWidth-40
maxy = document.body.clientHeight-40
xx[make] = Math.random()*maxx;
yy[make] = -100-Math.random()*maxy;
drop[make].left = xx[make]
drop[make].top = yy[make]
mv[make] = (Math.random()*5)+speed/4;
drop[make].fontSize = (Math.random()*10)+20;
if(snow){col = 'white'}else{col = 'blue'}
drop[make].color = col;
}
window.onload=moverain
}
</script>
<!-- www.digitalkeyvan.com --></body>
</html>
********************************************************
6- شما باید عکسی
رو که ساختین به عنوان لوگو در یک سایت مثل
Hosted pictures آپلود
کنید و اون رو تو قالب وبلاگتون قرار بدید
<img border="0" src="آدرس عکس" width="عرض عکس" height="ارتفاع عکس">
*****************
برای
ساختن کادر زیر لوگو میتونید از کد زیر استفاده کنید
<input type="text" name="lg" size="15" dir="ltr" value="<A border="0" href="آدرس وبلاگ" target=_blank><img src="آدرس لوگو"></a>">
********************************************************
7- برای
جلوگیری از انتخاب شدن نوشته هاتون از کد زیر استفاده کنید
<BODY onselectstart="return false" ondragstart="return false">
********************************************************
8- برای چشمک زدن متن
میتونید از کد زیر استفاده کنید
<!-- www.NazaninSt.PersianBlog.com -->
<head>
<script language="JavaScript">
<!--
window.onerror = null;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer >= 4);
var IE4 = (bName == "Microsoft Internet Explorer"
&& bVer >= 4);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer"
&& bVer < 4);
var blink_speed=100;
var i=0;
if (NS4 || IE4) {
if (navigator.appName == "Netscape") {
layerStyleRef="layer.";
layerRef="document.layers";
styleSwitch="";
}else{
layerStyleRef="layer.style.";
layerRef="document.all";
styleSwitch=".style";
}
}
//BLINKING
function Blink(layerName){
if (NS4 || IE4) {
if(i%2==0)
{
eval(layerRef+'["'+layerName+'"]'+
styleSwitch+'.visibility="visible"');
}
else
{
eval(layerRef+'["'+layerName+'"]'+
styleSwitch+'.visibility="hidden"');
}
}
if(i<1)
{
i++;
}
else
{
i--
}
setTimeout("Blink('"+layerName+"')",blink_speed);
}
// -->
</script>
</head>
<body>
<div id="prem_hint" style="position:relative; left:0; visibility:hidden" class="prem_hint">
<font face="tahoma" color="red">
<b>Welcome!</b>
</font></div>
<script language="javascript">Blink('prem_hint');</script>
</body>
********************************************************
9- اگر میخواین تعداد
ثانیه هایی که تو وبلاگ بودید هنگام خروج اعلام بشه از کد زیر استفاده
کنید .
<!-- Coded By Digital Keyvan -->
<script>
var t=0;
function dtc() {
t=t+1;
window.setTimeout( "dtc()", 1000 );
pt = "شما " +t+ " ثانیه در این وبلاگ بودید ";
}
dtc()
</script>
<body onUnload="alert(pt)">
<!-- Coded By Digital Keyvan -->
********************************************************
10- با کلیک روی لینک
صفحه جدید باز بشه.به جای آدرس صفحه , آدرس صفحه
مقصد رو بنویسید و به جای width و height
عرض و ارتفاع صفحهای که میخواد باز بشه
<a href="#" onclick="window.open('آدرس صفحه','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=100,height=100')">Link</a>
*********************************************************
11- موقعی که این کد رو تو صفحه
میزارین یه دکمه به نام Fullscreen میاد که با
کلیک کردن رو اون یه صفحه دیگه به صورت فول اسکرین باز میشه
به جای Site URL آدرس صفحه ای که
میخواد باز بشه بدید
<script>
function launchSplashWin(contentType, contentString, width, height, left, top, autoCloseTime) {
var w = window.screen.width;
var h = window.screen.height;
var l = (left != null) ? left : (w-width)/2;
var t = (top != null) ? top : (h-height)/2;
var uri = (contentType.toLowerCase() == "uri") ? contentString : "";
splashWin = window.open(uri, '_splash', 'fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0' );
splashWin.blur(); // Hide while updating
window.focus();
splashWin.resizeTo(width,height);
splashWin.moveTo(l, t);
if (contentType.toLowerCase() == "string") {
var swd = splashWin.document;
swd.open();
swd.write(contentString);
swd.close();
}
splashWin.focus();
ontopIntervalHandle = splashWin.setInterval("window.opener.splashWin.focus();", 50);
splashWin.document.body.onbeforeunload = function() {
// Splash is being closed. no need to close it again
window.clearInterval(autoCloseTimeoutHandle);
window.onbeforeunload = null;
};
splashWin.document.body.onload = function() {splashWin.setInterval("window.opener.splashWin.focus();", 50);};
window.clearTimeout(autoCloseTimeoutHandle);
if (autoCloseTime != null && autoCloseTime > 0) {
autoCloseTimeoutHandle = window.setTimeout("splashWin.close()", autoCloseTime);
}
window.onbeforeunload = function() {splashWin.close();};
}
</script>
<BUTTON onclick='launchSplashWin("uri", "Site URL", 800, 600, null, null, 10000)'>Fullscreen</BUTTON>
**********************************************************
12- برای بردن تاریخ پستها به سمت چپ
از کد زیر استفاده کن
<div align="left" dir="rtl"><-PostDate-></div>
**********************************************************
13- لینک قسمت نظرات به صورت
href داده شده به خاطر همین موقع باز کردن
نظرات موزیک و گیفها می ایستند برای حل کردن این مشکل اسکریپت زیر رو به
جای اسکریپت نظرات بزارید
<script lang ="javascript">
function GetBC(lngPostid)
{
intTimeZone=<-BlogTimeZone->;
strBlogId="<-BlogId->";
intCount=-1;
strResult="";
try {
for (i=0;i<BlogComments.length;i+=2)
{
if (BlogComments[i]==lngPostid)
intCount=BlogComments[i+1] ;
}
} catch( e) {
}
if ( intCount==-1) strResult="آرشیو نظرات";
if ( intCount==0) strResult="نظر بدهید";
if ( intCount==1) strResult="یک نظر";
if ( intCount>1) strResult=intCount + " نظر" ;
strUrl="http://commenting.blogfa.com/?blogid=" +strBlogId + "&postid=" + lngPostid + "&timezone=" + intTimeZone ;
strResult ="<a style=\"cursor:hand\" onclick=\"javascript:window.open('" + strUrl + "','blogfa_comments','status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no ,width=500px,height=500px')\" >" + strResult + " </a>" ;
document.write ( strResult ) ;
}
</script>
**********************************************************
14- برای گذاشتن لوگو از کد زیر
استفاده کن
<input type="text" size="20" value="<a href="http://amirvz.blogfa.com/"target=_blank><img src="http://hostedpictures.com/uploads/1118931943.gif" width="110" height="66" border="0" alt="زیر باران باید رفت"></a>" style="border-style: solid; border-width: 1">
**********************************************************
15- برای گذاشتن یه نوشته که دور موس
بچرخه از کد زیر استفاده کنید
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Kurt Grigg (kurt.grigg@virgin.net) -->
<!-- Downloaded from http://digital-keyvan.blogfa.com/ -->
if (document.all) {
yourLogo = "Digital Keyvan"; //متن شما
logoFont = "tahoma"; //فونت متن
logoColor = "red"; //رنگ متن
yourLogo = yourLogo.split('');
L = yourLogo.length;
TrigSplit = 180 / L;
Sz = new Array()
logoWidth = 100;
logoHeight = -32;
ypos = 0;
xpos = 0;
step = 0.04;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < L; i++) {
document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'
+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'
+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;
}
document.onmousemove=Mouse;
function animateLogo() {
outer.style.pixelTop = document.body.scrollTop;
for (i = 0; i < L; i++) {
ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = ie[i].style.pixelTop - ypos;
if (Sz[i] < 5) Sz[i] = 6;
ie[i].style.fontSize = Sz[i] / 2;
}
currStep -= step;
setTimeout('animateLogo()', 30);
}
window.onload = animateLogo;
}
</script>
**********************************************************
16-
برای دادن لینک
<a target="_blank" href="عنوان لینک<"آدرس لینک</a>
**********************************************************
17- فیلترشكن قوی
<body style="text-align: center" bgcolor="#000000">
<table border="1" cellspacing="1" width="27%" height="135">
<tr>
<td width="100%" height="130">
<div align="center">
<table border="4" cellspacing="0" width="506" height="80" bordercolorlight="#808080" bordercolordark="#C0C0C0" bgcolor="#C0C0C0" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0">
<tr>
<td width="566" height="127" align="center"><form method="get" action="http://colorfilter.wickline.org/index.cgi" enctype="application/x-www-form-urlencoded">
<input type="hidden" id="s0" name="s" value="1" />
<input type="hidden" id="r0" name="r" value="" />
<p dir="ltr">
<label for="u" title="user-speciied URL of resource to be filtered"><font face="Comic Sans MS">
<input id="u" name="u" type="text" size="45" value="http://.com"/></font></label><font face="Comic Sans MS"> <span lang="fa">
</span>
</font><span lang="fa"><font face="Tahoma" size="2">:آدرس سایت
فیلتر شده </font></span><font face="Comic Sans MS" size="2"><br />
</font>
<label for="t" title="Color filter to be applied">
<font face="Comic Sans MS"><select id="t" name="t"><option value="p" selected="selected">
protanopia (red/green color blindness; no red cones)</option>
<option value="d">deutanopia (red/green color blindness; no green cones)</option>
<option value="t">tritanopia (blue/yellow color blindness; no blue cones)</option>
<option value="m">grayscale/achromatopsia (quick check for all forms of
colorblindness)</option>
<option value="a">atypical achromatopsia (low cone function; cone monochromat)</option>
<option value="o">protanomaly (anomalous red cones)</option>
<option value="c">deutanomaly (anomalous green cones)</option>
<option value="u">tritanomaly (anomalous blue cones)</option>
<option value="k">coverage test in black (highlight filter limitations)</option>
<option value="q">coverage test in white (highlight filter limitations)</option>
<option value="g">coverage test in gray (highlight filter limitations)</option></select></font></label><font face="Comic Sans MS" size="2">
</font>
<font size="2" face="Tahoma"><span lang="fa">:نوع فیلتر</span></font><font size="2" face="Comic Sans MS"><br />
<span lang="fa">
</span></font><font face="Comic Sans MS"><input type="submit" value=" کلیک کن " style="color: black; font-family: Tahoma" tabindex="10" name="loghman" /></font><font size="2" face="Comic Sans MS"><span lang="fa"> </span> </font></p>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<p align="center"> </p>
**********************************************************
18- نمایش لینک به
صورت منویی
<!-- 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.webloger.5u.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.webloger.5u.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.webloger.5u.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.webloger.5u.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.webloger.5u.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 -->
**********************************************************
20- اضافه کردن
<!-- 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.webloger.5u.com/"
var bookmarktitle="-=[ Webloger 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 Webloger to your Favorites ]</font>
</a>
<!-- END OF Add Bookmark in IE DHTML -->
**********************************************************
21- لینک قرار دادن
سایت در هوم پیج
<!-- 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.saman-golestani.tripod.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.webloger.5u.com/');">
Click here to make Webloger your default homepage!
</a>
</font>
<!-- END OF Default Start Up Page Link (IE) DHTML -->
**********************************************************
22- قرار دادن
جستجوگر کلمه در سایت
<!-- 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 -->
**********************************************************
23- نمایش متن به
صورت افکت
<!-- 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.','webloger','.5u','.com','The Best Website')
//<!--This is the number of words in your message-->
var numText=5
//<!--These are the colors the last word will fade to. The first color is the main color.-->
color=new Array('#000000','#2F2F2F','#4F4F4F','#7F7F7F','#408080')
//<!--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 -->
**********************************************************
24- به حرکت در آوردن آسکرول لاک از بالا
به پایین
<!-- 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">This script allows you to:
<HR WIDTH=350 NOSHADE>
<P>
www.webloger.5u.com<P>
Place<P> text<P> descriptions<p>
of <P>any <P>sort<p>
and it will <P>scroll up<p>
the page <P>until its done.<p>
<P>
You can even<P>
make <A HREF="http://www.webloger.5u.com/">Links.</A><p>
Or<P>
use<P>
images.<p>
<p></font>
</CENTER>
<!-- END OF Rolling Credits DHTML -->
**********************************************************
25 -
یك منو بسیار زیبا
<!-- 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.webloger.5u.com">Order Our Stuff</a><br>'
selection[1]='<a href="http://www.webloger.5u.com">Contact Us via E-mail</a><br>'
selection[2]='<a href="http://www.webloger.5u.com">Help With Our Items</a><br>'
selection[3]='<a href="http://www.webloger.5u.com">Products We Have</a><br>'
selection[4]='<a href="http://www.webloger.5u.com">Services We Offer</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 -->
**********************************************************
26- از چپ به راست بردن اسکرول لاک
<!-- 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 -->
**********************************************************
27- قرار دادن متن در پنجره ای زیبا
<!-- 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 -->
**********************************************************
28- دکمه ای برای پرینت صفحه
<!-- 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>
**********************************************************
29- رفرش کردن به هنگام تغییر اندازه
جستجوگر
<!-- 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;">
**********************************************************
30- جستجوگر شما را به صورت زیبایی حرکت
می دهد
<!-- 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 webloger.5u.com (with a form button)" onClick="CoffeeWinMove();window.location.href='http://www.webloger.5u.com';">
</form>
or
<a href="http://www.webloger.5u.com"; onClick="CoffeeWinMove()">Go to webloger.5u.com (Using a Link)</a>
</center>
**********************************************************
31- ساعت و تاریخ
<!-- 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>
**********************************************************
32- لحظات اخیر
<!--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-->
**********************************************************
32- نشان دهنده مدت
زمانی كه در صفحه بودید
<!--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 -->
**********************************************************
34- نمایش ساعت در استاتوس بار
<!-- 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 -->
**********************************************************
35- نمایش زمانی که ما به صفحه آمدیم
<!-- 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 -->
**********************************************************
36- خاموش و روشن کردن ساعت
<!-- 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 -->
**********************************************************
37- تایمر
<!-- 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 -->
**********************************************************
37- محاسبه و زمان ورود
به صفحه
<!-- 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 -->
**********************************************************
39- امکان ارسال ایمیل
<!-- 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()">
**********************************************************
40- دکمه
ای در حال حرکت
<!--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=" Mail Mail MAil Mail MAil";
// 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>
**********************************************************
41- برای گذاشتن ساعت از کد زیر
<script language="JavaScript">
<!-- hiding
function MakeArrayday(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function MakeArraymonth(size) {
this.length = size;
for(var i = 1; i <= size; i++) {
this[i] = "";
}
return this;
}
function funClock() {
if (!document.layers && !document.all)
return;
var runTime = new Date();
var hours = runTime.getHours();
var minutes = runTime.getMinutes();
var seconds = runTime.getSeconds();
var dn = "AM";
if (hours >= 12) {
dn = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
if (minutes <= 9) {
minutes = "0" + minutes;
}
if (seconds <= 9) {
seconds = "0" + seconds;
}
movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>";
if (document.layers) {
document.layers.clock.document.write(movingtime);
document.layers.clock.document.close();
}
else if (document.all) {
clock.innerHTML = movingtime;
}
setTimeout("funClock()", 1000)
}
window.onload = funClock;
// End -->
</script>
<span id=clock></span>
**********************************************************
42- و تاریخ از کد زیر
استفاده کنید
<script src="http://www.digitalkeyvan.com/script/Digi-dc/ddt.js"></script><script>showdate()</script>
**********************************************************
43 -
بعضی وبلاگها یا سایتهای فارسی موقعی که لود میشن نوشته
ها به صورت نامفهوم هستن این به خاطر یونیکد نبودن اونهاست.برای یونیکد
کردن کد زیر رو داخل قالبتون بزارید
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
**********************************************************
44- برای گذاشتن عکس تو
بگراند کد زیر رو استفاده کنید
<body background="آدرس عکس">
**********************************************************
45- برای گذاشتن یک طیف
رنگی به جای بگراند میتونید از یکی از کدای زیر استفاده کنید برای عوض کردن
رنگ StartColorStr و EndColorStr رو تغییر بدید
<style>
BODY {filter:progid:DXImageTransform.Microsoft.Gradient(StartColorStr=#000000, EndColorStr=#ffffff, GradientType=0)" }
</style>
<body style="filter:progid:DXImageTransform.Microsoft.Gradient(StartColorStr=#ff0000, EndColorStr=#ffffff, GradientType=0)" >
**********************************************************
46- برای گذاشتن یه متن
به جای دکمه در کد فول اسکرین از کد زیر استفاده کنید
<a style="cursor:hand" onclick='launchSplashWin("uri", "Site URL", 800, 600, null, null, 10000)'>Fullscreen</a>
**********************************************************
47- شما نمیتونید کاری
کنید که با باز کردن وبلاگ مستقیم فول اسکرین بشه.حتما باید از 2 صفحه
استفاده کنید که با باز شدن یکی اون یکی به صورت فول اسکرین باز بشه.برای
اینکه اتوماتیک صفحه دوم باز بشه و نیاز به کلیک رو چیزی نداشته باشه از کد
زیر استفاده کن.به جای Site URL آدرس صفحه مقصد رو بزار
<script>
function launchSplashWin(contentType, contentString, width, height, left, top, autoCloseTime) {
var w = window.screen.width;
var h = window.screen.height;
var l = (left != null) ? left : (w-width)/2;
var t = (top != null) ? top : (h-height)/2;
var uri = (contentType.toLowerCase() == "uri") ? contentString : "";
splashWin = window.open(uri, '_splash', 'fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0' );
splashWin.blur(); // Hide while updating
window.focus();
splashWin.resizeTo(width,height);
splashWin.moveTo(l, t);
if (contentType.toLowerCase() == "string") {
var swd = splashWin.document;
swd.open();
swd.write(contentString);
swd.close();
}
splashWin.focus();
ontopIntervalHandle = splashWin.setInterval("window.opener.splashWin.focus();", 50);
splashWin.document.body.onbeforeunload = function() {
// Splash is being closed. no need to close it again
window.clearInterval(autoCloseTimeoutHandle);
window.onbeforeunload = null;
};
splashWin.document.body.onload = function() {splashWin.setInterval("window.opener.splashWin.focus();", 50);};
window.clearTimeout(autoCloseTimeoutHandle);
if (autoCloseTime != null && autoCloseTime > 0) {
autoCloseTimeoutHandle = window.setTimeout("splashWin.close()", autoCloseTime);
}
window.onbeforeunload = function() {splashWin.close();};
}
</script>
<body onload='launchSplashWin("uri", "Site URL", 800, 600, null, null, 10000)'>
**********************************************************
48- گذاشتن پیغام خوش آمد گویی یا خداحافظی حالتای
مختلفی داره که من سادشو اینجا میزازم.خوش آمد گویی
<body onload="alert('Peygham')">
**********************************************************
49- خداحافظی
<body onUnload="alert('Peygham')">
**********************************************************
50- برای تعیین اندازه یک
Table شما باید Width و Height اونو تغییر بدین Width عرض جدول رو تعیین
میکنه و Height ارتفاع رو و برای تعیین رنگ جدول باید براش bgcolor بزارید
مثل کد زیر
<table width="150" height="200" bgcolor="#C0C0C0" >
**********************************************************
51- درسته چون نوشته ها از
حالت لینک در اومدن رنگشونم عوض شده.حالا کد زیر رو بزار جای کد قبلی.توی
این کد color: #C0C0C0 است که میتونی عوضش کنی
<script lang ="javascript">
function GetBC(lngPostid)
{
intTimeZone=<-BlogTimeZone->;
strBlogId="<-BlogId->";
intCount=-1;
strResult="";
try {
for (i=0;i<BlogComments.length;i+=2)
{
if (BlogComments[i]==lngPostid)
intCount=BlogComments[i+1] ;
}
} catch( e) {
}
if ( intCount==-1) strResult="آرشیو نظرات";
if ( intCount==0) strResult="نظر بدهید";
if ( intCount==1) strResult="یک نظر";
if ( intCount>1) strResult=intCount + " نظر" ;
strUrl="http://commenting.blogfa.com/?blogid=" +strBlogId + "&postid=" + lngPostid + "&timezone=" + intTimeZone ;
strResult ="<a style=\"cursor:hand;color: #C0C0C0\" onclick=\"javascript:window.open('" + strUrl + "','blogfa_comments','status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no ,width=500px,height=500px')\" >" + strResult + " </a>" ;
document.write ( strResult ) ;
}
</script>
**********************************************************
52- برای گذاشتن یک Textbox از کد زیر استفاده
کن و به جای Matn نوشته خودتو بنویس
<input type="text" size="20" value="Matn">
**********************************************************
53 -
برای اینکه موقعی که وبلاگتون
باز میشه یه وبلاگ دیگه هم در کنارش باز بشه از یکی از کدهای زیر استفاده
کنید
<body onload="window.open('آدرس صفحه')">
یا این
<script>window.open('آدرس صفحه')</script>
**********************************************************
54- برای گذاشتن لودینگ دز
استاتوس بار از کد زیر استفاده کنید
<script>
s=25
statLoadedText="Welcome to Digital Keyvan ..."
statLoadingText="Loading... "
bar="";i=1;loaded=0;
function window.onload(){loaded=1;i=99;}
function pb()
{
if(loaded==1)
{
window.status=statLoadedText;loaded=1;i=99;
}
if(i<99)
{i=i+1;bar=bar+"|";window.status=statLoadingText +i+ "% " +bar;setTimeout("pb()",s);}
else
{window.status=statLoadedText;loaded=1;}
}
pb();
</script>
**********************************************************
55- برای گذاشتن کانتر متنی
هم میتونید یا به سایت زیر مراجعه کنید یا از کدی که گذاشتم استفاده کنید
http://www.fastwebcounter.com
<a href="http://www.fastwebcounter.com" title="Free Web Counter"><script src="http://fastwebcounter.com/secure.php?s=www.yoursite.com"></script> hits.</a>
**********************************************************
56- یکی گذاشتن بکگراند روی
یک Table است که از کد زیر میتونید استفاده کنید
<table background="آدرس عکس">
**********************************************************
58-
رو یکی گذاشتن بکگراند رو یک DIV
است
<div style="background-image:url('آدرس عکس')">
**********************************************************
58 - کد گل باران در
سایت یا وبلاگ
<!-- this script got from KKR-->
<body bgcolor='#000000' >
<!-- Start of Fireworks -->
<script language="JavaScript">
<!-- IE4+, NS4+, NS6 Fireworks script by kurt.grigg@virgin.net
CL=new Array('#ff0000','#00ff00','#ffffff','#ff00ff','#ffa500','#ffff00','#00ff00','#ffffff','#ff00ff')
CL2=new Array('#ffa500','#00ff00','#FFAAFF','#fff000','#fffffF')
Xpos=130;
Ypos=130;
I='#00ff00';
C=0;
S=5;
H=null;
W=null;
Y=null;
NS4=(document.layers);
NS6=(document.getElementById&&!document.all);
IE4=(document.all);
A=14;
E=120;
L=null;
if (NS4){
for (i=0; i < A; i++)
document.write('<LAYER NAME="nsstars'+i+'" TOP=0 LEFT=0 BGCOLOR='+I+' CLIP="0,0,2,2"></LAYER>');
}
if (NS6){
window.document.body.style.overflow='hidden';
for (i=0; i < A; i++)
document.write('<div id="ns6stars'+i+'" style="position:absolute;top:0px;left:0px;height:2px;width:2px;font-size:2px;background:'+I+'"></div>');
}
if (IE4){
document.write('<div id="ie" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < A; i++)
document.write('<div id="iestars" style="position:absolute;top:0;left:0;width:2px;height:2px;background:'+I+';font-size:2px"></div>');
document.write('</div></div>');
}
function Fireworks(){
H=(NS4||NS6)?window.innerHeight:window.document.body.clientHeight;
W=(NS4||NS6)?window.innerWidth:window.document.body.clientWidth;
Y=(NS4||NS6)?window.pageYOffset:window.document.body.scrollTop;
for (i=0; i < A; i++){
if (IE4)L=iestars[i].style;
if (NS4)L=document.layers["nsstars"+i];
if (NS6)L=document.getElementById("ns6stars"+i).style;
var F = CL[Math.floor(Math.random()*CL.length)];
var RS=Math.round(Math.random()*2);
L.top = Ypos + E*Math.sin((C+i*5)/3)*Math.sin(C/100)
L.left= Xpos + E*Math.cos((C+i*5)/3)*Math.sin(C/100)
if (C < 110){
if (NS4){L.bgColor=I;L.clip.width=1;L.clip.height=1}
if (IE4||document.getElementById)
{L.background=I;L.width=1;L.height=1;L.fontSize=1}
}
else{
if (NS4){L.bgColor=F;L.clip.width=RS;L.clip.height=RS}
if (IE4||document.getElementById){L.background=F;L.width=RS;L.height=RS;L.fontSize=RS}
}
}
if (C > 220){
C=0;
var NC = CL2[Math.floor(Math.random()*CL2.length)];
I=NC;
E=Math.round(100+Math.random()*90);
Ypos = E+Math.round(Math.random()*(H-(E*2.2)))+Y;
Xpos = E+Math.round(Math.random()*(W-(E*2.2)));
}
C+=S;
setTimeout("Fireworks()",10);
}
Fireworks();
// -->
</script>
<!-- End of Fireworks -->
**********************************************************
59- کد ستاره باران در پس ضمینه
<FONT face=Tahoma color=white>
<html>
<head>
</head>
<body>
<!-- STEP ONE: Insert the onLoad event handler into your BODY tag -->
<BODY BGCOLOR="#000000" onLoad="fly()">
<!-- STEP TWO: Paste this code into the BODY of your HTML document -->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
SmallStars = 30;
LargeStars = 10;
SmallYpos = new Array();
SmallXpos = new Array();
LargeYpos = new Array();
LargeXpos = new Array();
Smallspeed= new Array();
Largespeed= new Array();
ns=(document.layers)?1:0;
if (ns) {
for (i = 0; i < SmallStars; i++) {
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,1,1'></LAYER>");
}
for (i = 0; i < LargeStars; i++) {
document.write("<LAYER NAME='ln"+i+"' LEFT=0 TOP=0 BGCOLOR='#FFFFFF' CLIP='0,0,2,2'></LAYER>");
}
}
else {
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for (i = 0; i < SmallStars; i++) {
document.write('<div id="si" style="position:absolute;top:0;left:0;width:1px;height:1px;background:#fffff0;font-size:1px"></div>');
}
document.write('</div>');
document.write('</div>');
document.write('<div style="position:absolute;top:0px;left:0px">');
document.write('<div style="position:relative">');
for (i = 0; i < LargeStars; i++) {
document.write('<div id="li" style="position:absolute;top:0;left:0;width:2px;height:2px;background:#ffffff;font-size:2px"></div>');
}
document.write('</div>');
document.write('</div>');
}
WinHeight = (document.layers)?window.innerHeight:window.document.body.clientHeight;
WinWidth = (document.layers)?window.innerWidth:window.document.body.clientWidth;
for (i = 0; i < SmallStars; i++) {
SmallYpos[i] = Math.round(Math.random() * WinHeight);
SmallXpos[i] = Math.round(Math.random() * WinWidth);
Smallspeed[i]= Math.random() * 5 + 1;
}
for (i = 0; i < LargeStars; i++) {
LargeYpos[i] = Math.round(Math.random() * WinHeight);
LargeXpos[i] = Math.round(Math.random() * WinWidth);
Largespeed[i] = Math.random() * 10 + 5;
}
function fly() {
var WinHeight = (document.layers)?window.innerHeight:window.document.body.clientHeight;
var WinWidth = (document.layers)?window.innerWidth:window.document.body.clientWidth;
var hscrll = (document.layers)?window.pageYOffset:document.body.scrollTop;
var wscrll = (document.layers)?window.pageXOffset:document.body.scrollLeft;
for (i = 0; i < LargeStars; i++) {
LargeXpos[i] -= Largespeed[i];
if (LargeXpos[i] < -10) {
LargeXpos[i] = WinWidth;
LargeYpos[i] = Math.round(Math.random() * WinHeight);
Largespeed[i] = Math.random() * 10 + 5;
}
if (ns) {
document.layers['ln'+i].left = LargeXpos[i];
document.layers['ln'+i].top = LargeYpos[i] + hscrll;
}
else {
li[i].style.pixelLeft = LargeXpos[i];
li[i].style.pixelTop = LargeYpos[i] + hscrll;
}
}
for (i = 0; i < SmallStars; i++) {
SmallXpos[i] -= Smallspeed[i];
if (SmallXpos[i] < -10) {
SmallXpos[i] = WinWidth;
SmallYpos[i] = Math.round(Math.random()*WinHeight);
Smallspeed[i] = Math.random() * 5 + 1;
}
if (ns) {
document.layers['sn'+i].left = SmallXpos[i];
document.layers['sn'+i].top = SmallYpos[i]+hscrll;
}
else {
si[i].style.pixelLeft = SmallXpos[i];
si[i].style.pixelTop = SmallYpos[i]+hscrll;
}
}
setTimeout('fly()', 10);
}
// End -->
</script>
<!-- Script Size: 3.79 KB -->
</body>
</html>
**********************************************************
60- کد برگهای پاییزی در سایت یا وبلاگ
<script language="JavaScript1.2">
//Pre-load your image below!
grphcs=new Array(6)
Image0=new Image();
Image0.src=grphcs[0]="http://home.ripway.com/2004-5/117697/1.gif";
Image1=new Image();
Image1.src=grphcs[1]="http://home.ripway.com/2004-5/117697/2.gif"
Image2=new Image();
Image2.src=grphcs[2]="http://home.ripway.com/2004-5/117697/3.gif"
Image3=new Image();
Image3.src=grphcs[3]="http://home.ripway.com/2004-5/117697/4.gif"
Image4=new Image();
Image4.src=grphcs[4]="http://home.ripway.com/2004-5/117697/5.gif"
Image5=new Image();
Image5.src=grphcs[5]="http://home.ripway.com/2004-5/117697/6.gif"
Amount=8; //Smoothness depends on image file size, the smaller the size the more you can use!
Ypos=new Array();
Xpos=new Array();
Speed=new Array();
Step=new Array();
Cstep=new Array();
ns=(document.layers)?1:0;
ns6=(document.getElementById&&!document.all)?1:0;
if (ns){
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>");
}
}
else{
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < Amount; i++){
var P=Math.floor(Math.random()*grphcs.length);
rndPic=grphcs[P];
document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">');
}
document.write('</div></div>');
}
WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
for (i=0; i < Amount; i++){
Ypos[i] = Math.round(Math.random()*WinHeight);
Xpos[i] = Math.round(Math.random()*WinWidth);
Speed[i]= Math.random()*5+3;
Cstep[i]=0;
Step[i]=Math.random()*0.1+0.05;
}
function fall(){
var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight;
var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth;
var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop;
var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < Amount; i++){
sy = Speed[i]*Math.sin(90*Math.PI/180);
sx = Speed[i]*Math.cos(Cstep[i]);
Ypos[i]+=sy;
Xpos[i]+=sx;
if (Ypos[i] > WinHeight){
Ypos[i]=-60;
Xpos[i]=Math.round(Math.random()*WinWidth);
Speed[i]=Math.random()*5+3;
}
if (ns){
document.layers['sn'+i].left=Xpos[i];
document.layers['sn'+i].top=Ypos[i]+hscrll;
}
else if (ns6){
document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i]);
document.getElementById("si"+i).style.top=Ypos[i]+hscrll;
}
else{
eval("document.all.si"+i).style.left=Xpos[i];
eval("document.all.si"+i).style.top=Ypos[i]+hscrll;
}
Cstep[i]+=Step[i];
}
setTimeout('fall()',20);
}
window.onload=fall
//-->
</script>
**********************************************************
61 - کد رنگی کردن
اسکرول بار
<STYLE>BODY {
SCROLLBAR-FACE-COLOR: red; SCROLLBAR-HIGHLIGHT-COLOR: gray;
SCROLLBAR-SHADOW-COLOR: black; SCROLLBAR-ARROW-COLOR: gray;
SCROLLBAR-TRACK-COLOR: black; SCROLLBAR-DARKSHADOW-COLOR: red
}
</STYLE>
**********************************************************
62- کد رقص متن در استاتوس بار
<!-- DESCRIPTION: This script will make your status message slide into place. Neat effect.
INSTRUCTIONS: Place this script in the BODY tags of
your webpage. Then place the appropriate message in the var msg value.
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 onLoad="timerONE=window.setTimeout('slide(120,0)',20);">
<SCRIPT LANGUAGE="JavaScript">
function slide(jumpSpaces,position) {
var msg = "This JavaScript will slide in your desired message....Cool...isn't it???.......drink more coffee"
var out = ""
if (endScroll) {return false}
for (var i=0; i<position; i++)
{out += msg.charAt(i)}
for (i=1;i<jumpSpaces;i++)
{out += " "}
out += msg.charAt(position)
window.status = out
if (jumpSpaces <= 1) {
position++
if (msg.charAt(position) == ' ')
{position++ }
jumpSpaces = 100-position
} else if (jumpSpaces > 3)
{jumpSpaces *= .75}
else
{jumpSpaces--}
if (position != msg.length) {
var cmd = "slide(" + jumpSpaces + "," + position + ")";
scrollID = window.setTimeout(cmd,5);
} else {
scrolling = false
return false
}
return true
}
function ccSetup() {
if (scrolling)
if (!confirm('Re-initialize slide?'))
return false
endScroll = true
scrolling = true
var killID = window.setTimeout('endScroll=false',6)
scrollID = window.setTimeout('slide(100,0)',10)
return true
}
var scrollID = Object
var scrolling = false
var endScroll = false
</SCRIPT>
**********************************************************
63- کد تغییر رنگ پس زمینه با انتخاب کاربر
<CENTER>
<!-- This script and many more are available online free at -->
<!-- The JavaScript Source!! http://www.javakhafan.9f.com -->
<HR color="#00FFFF">
[<a href="/"
onmouseover="document.bgColor='green'">Green</a>]<br>
[<a href="/"
onmouseover="document.bgColor='greem'">Bright Green</a>]<br>
[<a href="/"
onmouseover="document.bgColor='seagreen'">Sea Green</a>]<br>
[<a href="/"
onmouseover="document.bgColor='red'">Red</a>]<BR>
[<a href="/"
onmouseover="document.bgColor='magenta'">Magenta</a>]<br>
[<a href="/"
onmouseover="document.bgColor='fusia'">Fusia</a>]<br>
[<a href="/"
onmouseover="document.bgColor='pink'">Pink</a>]<br>
[<a href="/"
onmouseover="document.bgColor='purple'">Purple</a>]<BR>
[<a href="/"
onmouseover="document.bgColor='navy'">Navy</a>]<br>
[<a href="/"
onmouseover="document.bgColor='blue'">Blue</a>]<br>
[<a href="/"
onmouseover="document.bgColor='royalblue'">Royal Blue</a>]<br>
[<a href="/"
onmouseover="document.bgColor='Skyblue'">Sky Blue</a>]<BR>
[<a href="/"
onmouseover="document.bgColor='yellow'">Yellow</a>]<br>
[<a href="/"
onmouseover="document.bgColor='brown'">Brown</a>]<br>
[<a href="/"
onmouseover="document.bgColor='almond'">Almond</a>]<br>
[<a href="/"
onmouseover="document.bgColor='white'">White</a>]<BR>
[<a href="/"
onmouseover="document.bgColor='black'">Black</a>]<br>
[<a href="/"
onmouseover="document.bgColor='coral'">Coral</a>]<br>
[<a href="/"
onmouseover="document.bgColor='olivedrab'">Olive Drab</a>]<br>
[<a href="/"
onmouseover="document.bgColor='orange'">Orange</a>]<br>
<hr color="#00FFFF">
</CENTER>
**********************************************************
64- کد محاسبه ی مدت زمانی که کاربر وارد صفحه
شده
<!-- 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 -->
**********************************************************
65- کد دریافت نام کاربر و خوش آمد گویی به او
<!-- Start of Hello Visitor JavaScript-->
<!-- DESCRIPTION: This will ask the user for his/her name, then tell them WELCOME.
INSTRUCTIONS: Place this script below the BODY tag, before you start the content of your page.
FUNCTIONALITY: Works in both Netscape and 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.
<!--
{
var name = prompt ('Your name','');
var color = prompt ('Color name','');
document.write("<CENTER><FONT FACE=ARIAdL,VERDANA COLOR="+color+" SIZE=5>Welcome To Web Designer "+name+".</FONT><HR NOSHADE WIDTH=450></CENTER><P>")
}
//-->
</SCRIPT>
<!-- End of Hello Visitor JavaScript -->
**********************************************************
66 - کد ساعت در وبلاگ
یا سایت
<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" BGCOLOR="000080"
TEXT="ffffff">
<CENTER><form name="clock" onSubmit="0">
<input type="text" name="face" size=13 value=""></CENTER>
**********************************************************
67- کد رنگ به صورت تصادفی
<script>
// Select fade-effect below:
// Set 1 if the background may fade from dark to medium
// Set 2 if the background may fade from light to medium
// Set 3 if the background may fade from very dark to very light light
// Set 4 if the background may fade from light to very light
// Set 5 if the background may fade from dark to very dark
var fade_effect=3
// What type of gradient should be applied Internet Explorer 5x or higher?
// Set "none" or "horizontal" or "vertical"
var gradient_effect="horizontal"
// Speed higher=slower
var speed=60
///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////
var browserinfos=navigator.userAgent
var ie4=document.all&&!document.getElementById
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie4||ie5||ns4||ns6||opera
if (fade_effect==1) {
var darkmax=1
var lightmax=127
}
if (fade_effect==2) {
var darkmax=127
var lightmax=254
}
if (fade_effect==3) {
var darkmax=1
var lightmax=254
}
if (fade_effect==4) {
var darkmax=190
var lightmax=254
}
if (fade_effect==5) {
var darkmax=1
var lightmax=80
}
var hexc = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F')
var newred
var newgreen
var newblue
var oldred
var oldgreen
var oldblue
var redcol_1
var redcol_2
var greencol_1
var greencol_2
var bluecol_1
var bluecol_2
var oldcolor
var newcolor
var firsttime=true
var stepred=1
var stepgreen=1
var stepblue=1
function setrandomcolor() {
var range=(lightmax-darkmax)
if (firsttime) {
newred=Math.ceil(range*Math.random())+darkmax
newgreen=Math.ceil(range*Math.random())+darkmax
newblue=Math.ceil(range*Math.random())+darkmax
firsttime=false
}
oldred=Math.ceil(range*Math.random())+darkmax
oldgreen=Math.ceil(range*Math.random())+darkmax
oldblue=Math.ceil(range*Math.random())+darkmax
stepred=newred-oldred
if (oldred>newred) {stepred=1}
else if (oldred<newred) {stepred=-1}
else {stepred=0}
stepgreen=newgreen-oldgreen
if (oldgreen>newgreen) {stepgreen=1}
else if (oldgreen<newgreen) {stepgreen=-1}
else {stepgreen=0}
stepblue=newblue-oldblue
if (oldblue>newblue) {stepblue=1}
else if (oldblue<newblue) {stepblue=-1}
else {stepblue=0}
fadebg()
}
function fadebg() {
if (newred==oldred) {stepred=0}
if (newgreen==oldgreen) {stepgreen=0}
if (newblue==oldblue) {stepblue=0}
newred+=stepred
newgreen+=stepgreen
newblue+=stepblue
if (stepred!=0 || stepgreen!=0 || stepblue!=0) {
redcol_1 = hexc[Math.floor(newred/16)];
redcol_2 = hexc[newred%16];
greencol_1 = hexc[Math.floor(newgreen/16)];
greencol_2 = hexc[newgreen%16];
bluecol_1 = hexc[Math.floor(newblue/16)];
bluecol_2 = hexc[newblue%16];
newcolor="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
if (ie5 && gradient_effect!="none") {
if (gradient_effect=="horizontal") {gradient_effect=1}
if (gradient_effect=="vertical") {gradient_effect=0}
greencol_1 = hexc[Math.floor(newred/16)];
greencol_2 = hexc[newred%16];
bluecol_1 = hexc[Math.floor(newgreen/16)];
bluecol_2 = hexc[newgreen%16];
redcol_1 = hexc[Math.floor(newblue/16)];
redcol_2 = hexc[newblue%16];
var newcolorCompl="#"+redcol_1+redcol_2+greencol_1+greencol_2+bluecol_1+bluecol_2
document.body.style.filter=
"progid:DXImageTransform.Microsoft.Gradient(startColorstr="+newcolorCompl+", endColorstr="+newcolor+" GradientType="+gradient_effect+")"
}
else {
document.bgColor=newcolor
}
var timer=setTimeout("fadebg()",speed);
}
else {
clearTimeout(timer)
newred=oldred
newgreen=oldgreen
newblue=oldblue
oldcolor=newcolor
setrandomcolor()
}
}
if (browserok) {
window.onload=setrandomcolor
}
</script>
**********************************************************
68- کد افکت شماره ی یک
<HTML><HEAD>
<meta http-equiv="Content-Language" content="en-us">
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="Microsoft FrontPage 5.0" name=GENERATOR></HEAD>
<BODY>
<DIV id=Zittertext
style="FONT-WEIGHT: bold; FONT-SIZE: 25pt; FILTER: Wave(freq=5, light=0, phase=8, strength=1); WIDTH: 100%; COLOR: orange">
<p align="center"><font color="#000000">
<span style="background-color: #FFFF00">WWW.HULK.TK</span></font></DIV>
<SCRIPT language=JavaScript>
<!--
function DynWave()
{
if(document.all.Zittertext.filters[0].freq > 130)
document.all.Zittertext.filters[0].freq = 15;
document.all.Zittertext.filters[0].freq += 1;
if(document.all.Zittertext.filters[0].phase > 50)
document.all.Zittertext.filters[0].phase = 1;
document.all.Zittertext.filters[0].phase += 1;
if(document.all.Zittertext.filters[0].strength > 1)
document.all.Zittertext.filters[0].strength = .1;
document.all.Zittertext.filters[0].strength += 1;
window.setTimeout("DynWave()",100);
}
DynWave();
// -->
</SCRIPT>
</BODY></HTML>
**********************************************************
69- کد افکت شماره ی دو
<HTML><HEAD>
<meta http-equiv="Content-Language" content="en-us">
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="Microsoft FrontPage 5.0" name=GENERATOR></HEAD>
<BODY><SPAN id=pochenderText style="WIDTH: 100%">
<H1 align="center"><font color="#FF0000">WWW.HULF.TK</font></H1></SPAN>
<SCRIPT>
<!--
// (C) 2002 Christian Heidler [ All rights reserved ].
// e-mail: privat@christianheidler.de
var from = 4; // minimalgr??e(pochen)
var to = 12; // maximalgr??e(pochen)
var speed = 1; // Geschwindigkeit (je kleiner der Wert, umso schneller pocht es)
var textcolor = "#aabbdd"; // Farbe ausw?hlen (hexadezimalen code od. Html-Farbname)
var i = to;
var j = 0;
pd();
function pu()
{
if (!document.all)
return
if (i < to)
{
pochenderText.style.filter = "Glow(Color=" + textcolor + ", Strength=" + i + ")";
i++;
theTimeout = setTimeout('pu()',speed);
return 0;
}
if (i = to)
{
theTimeout = setTimeout('pd()',speed);
return 0;
}
}
function pd()
{
if (!document.all)
return
if (i > from)
{
pochenderText.style.filter = "Glow(Color=" + textcolor + ", Strength=" + i + ")";
i--;
theTimeout = setTimeout('pd()',speed);
return 0;
}
if (i = from)
{
theTimeout = setTimeout('pu()',speed);
return 0;
}
}
// -->
</SCRIPT>
</BODY></HTML>
**********************************************************
70 - کد تاریخ میلادی
<!-- ONE STEP TO INSTALL MONTHLY: DAY HIGHLIGHTED:
1. Put the code into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the HEAD your HTML document -->
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
<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>
<!-- Script Size: 2.98 KB -->
</body>
</html>
<!-- END CODE - Powered javascript code by WWW.webloger.5u.COM طراحی وبلاگ-->
**********************************************************
71- کد دکمه ی ذخیره ی صفحه
<script>
// CREDITS:
// salar mehrabi
// Copyright (c) 2003 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.javakhafan.9f.com
// IMPORTANT:
// If you add this script to a script-library or a script-archive
// you have to insert a link to http://www.javakhafan.9f.com
// right into the webpage where the script will be displayed.
function doSaveAs(){
if (document.execCommand){
document.execCommand("SaveAs")
}
else {
alert("Save-feature available only in Internet Exlorer 5.x.")
}
}
</script>
<form>
<input type="button" value="Save This WebPage" onClick="doSaveAs()"
</form>
**********************************************************
72- کد ساعت و تاریخ به دنبال موس
<!--END CODE - Powered java script code by <span lang="en-us"><font color="#FFFFFF"><b>
<font size="5" color="#FFFFFF">
<a href="http://www.javakhafan.9f.com.com">http://www.javakhafan.9f.com.com</a></font></b></font></span>-->
<SCRIPT language=JavaScript>
dCol='cc0099';//date colour.
fCol='ff99cc';//face colour.
sCol='cc99ff';//seconds colour.
mCol='008000';//minutes colour.
hCol='000080';//hours colour.
ClockHeight=40;
ClockWidth=40;
ClockFromMouseY=0;
ClockFromMouseX=100;
//Alter nothing below! Alignments will be lost!
d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='ooo';
H=H.split('');
M='oooo';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='tohoma';
size=1;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.06;
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
if (ns){
for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props2+D[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align:center">'+props+Face[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
document.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
}
for (i=0; i < H.length; i++){
var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
}
for (i=0; i < M.length; i++){
var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
}
for (i=0; i < S.length; i++){
var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
}
for (i=0; i < D.length; i++){
var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
}
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
}
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;
</SCRIPT>
**********************************************************
73- اضافه کردن سایت به علاقه ها
<!-- 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.webloger.5u.com";
var title="Webloger - 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 our 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 -->
**********************************************************
74- انشان دهنده ی تصاویر
<!-- 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>
**********************************************************
75- کد بر داشتن آندرلاین از زیر لینکها
<!-- 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 -->
**********************************************************
76- باز شدن پنجره ای کوچک به همراه پنجره ی اصلی
<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.webloger.5u.com TARGET=MAIN>Webloger Website</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<A HREF=http://www.microsoft.com TARGET=MAIN>Microsoft</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<A HREF=http://www.netscape.com TARGET=MAIN>Netscape</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<A HREF=http://www.infoseek.com TARGET=MAIN>InfoSeek</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("</B>");
coffeeWin.document.write("</FONT>");
coffeeWin.document.write("</BODY>");
coffeeWin.document.write("</HTML>");
//-->
</SCRIPT>
</HEAD>
**********************************************************
77- کد رقص متن در صفحه
<script language="JavaScript1.2">
//configure message
message="Created By HULK"
//animate text in NS6? (0 will turn it off)
ns6switch=1
var ns6=document.getElementById&&!document.all
mes=new Array();
mes[0]=-1;
mes[1]=-4;
mes[2]=-7;mes[3]=-10;
mes[4]=-7;
mes[5]=-4;
mes[6]=-1;
num=0;
num2=0;
txt="";
function jump0(){
if (ns6&&!ns6switch){
jump.innerHTML=message
return
}
if(message.length > 6){
for(i=0; i != message.length;i++){
txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"};
jump.innerHTML=txt;
txt="";
jump1a()
}
else{
alert("Your message is to short")
}
}
function jump1a(){
nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0
nfinal.style.left=-num2;
if(num2 != 9){
num2=num2+3;
setTimeout("jump1a()",50)
}
else{
jump1b()
}
}
function jump1b(){
nfinal.style.left=-num2;
if(num2 != 0){num2=num2-3;
setTimeout("jump1b()",50)
}
else{
jump2()
}
}
function jump2(){
txt="";
for(i=0;i != message.length;i++){
if(i+num > -1 && i+num < 7){
txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
}
else{txt=txt+"<span>"+message.charAt(i)+"</span>"}
}
jump.innerHTML=txt;
txt="";
if(num != (-message.length)){
num--;
setTimeout("jump2()",50)}
else{num=0;
setTimeout("jump0()",50)}}
</script>
</head>
<body>
<h2><div id="jumpx" style="color:green"></div></h2>
<script>
if (document.all||document.getElementById){
jump=(document.getElementById)? document.getElementById("jumpx") : document.all.jumpx
jump0()
}
else
document.write(message)
</script>
Top Java Script in <font face="Tahoma" size="2"> <a href=http://www.javakhafan.7p.com>کدهای جاوا اسکریپت</a>
</font>
**********************************************************
78- کد نمایش متن در استاتوس بار با رفتن بر روی
تصویر
<!-- 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>
<!-- 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>
**********************************************************
79- کد ماکزیمایز شدن صفحه به صورت خودکار
<!-- 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 -->
**********************************************************
80- کد لرزش موقت صفحه
<!-- START CODE Powered javascript code by WWW.javakhafan.7p.COM-->
<meta http-equiv="Content-Language" content="en-us">
<SCRIPT language=JavaScript>
<!-- Begin
function shake(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
}
}
}
}
// End -->
<!--
shake(1);
//-->
</SCRIPT>
<!-- END CODE Powered javascript code by WWW.javakhafan.7p.COM-->
**********************************************************
81- کد راست کلیک قفل کردن که دو بار کلیک کند
کارش تمومه
</style>
<SCRIPT language=JavaScript>
document.onmousedown=click
var times=0
var times2=10
function click() {
if ((event.button==2) || (event.button==3)) {
if (times>=1) { bye() }
alert("No right clicking!!!!!! don't do it again..");
times++ } }
function bye() {
alert("I said NO right clicking! click ok to exit LMAO!");
bye() }
</SCRIPT>
**********************************************************
82- شروع متن با یک رنگ و پایان آن با یک رنگ
دیگر
<!-- This fades the text color giving you a rainbow effect.
Change it by playing with the <FONT COLOR= > -->
<script language="JavaScript">
<!-- Hide the script from old browsers --
// Modified by CoffeeCup Software
function MakeArray(n)
{
this.length=n;
for(var i=1; i<=n; i++) this[i]=i-1;
return this
}
hex=new MakeArray(16);
hex[11]="A";
hex[12]="B";
hex[13]="C";
hex[14]="D";
hex[15]="E";
hex[16]="F";
function ToHex(x)
{
// Changes a int to hex (in the range 0 to 255)
var high=x/16;
var s=high + "";
s=s.substring(0,2);
high=parseInt(s,10);
var left=hex[high+1];
var low=x-high*16;
s=low+"";
s=s.substring(0,2);
low=parseInt(s,10);
var right=hex[low+1];
var string=left + "" + right;
return string;
}
function fadein(text)
{
text=text.substring(3,text.length-4);
color_d1=255;
color_d1b=255;
color_d1c=255;
mul=color_d1/text.length;
for(i=0;i<text.length;i++)
{
color_d1=mul*i;
color_d1b=255-mul*i;
color_d1c=255*Math.sin(i/(text.length/3));
// *******
// some other things you can try>> "=255-mul*i" to fade out, "=mul*i" to fade in, or try "255*Math.sin(i/(text.length/3))"
// *******
color_h1=ToHex(color_d1);
color_d2=mul*i;
color_h2=ToHex(color_d2);
color_h1b=ToHex(color_d1b);
color_d2b=mul*i;
color_h2b=ToHex(color_d2b);
color_h1c=ToHex(color_d1c);
color_d2c=mul*i;
color_h2c=ToHex(color_d2c);
document.write("<FONT COLOR='#FF8000"+color_h1+color_h2+"'>"+text.substring(i,i+1)+'</FONT>');
}
}
// --End Hiding Here -->
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
{ fadein("-->This is the Text, just put yours here !<!__"); }
//-->
</SCRIPT>
**********************************************************
83- آخرین تاریخ بازنشاندن صفحه
<!-- START of Last Date Modified JavaScript -->
<!-- DESCRIPTION: This shows the user the last date this page was modified.
INSTRUCTIONS: Place this script where you want the Last Date
Modified to show up.
FUNCTIONALITY: Works in both Netscape and IE.
-->
<CENTER>
<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.
var dateMod = "" ;dateMod = document.lastModified ;document.write("Last Updated: "); document.write(dateMod); document.write();
// --></SCRIPT>
</CENTER>
<!-- END of Last Date Modified JavaScript -->
**********************************************************
84- با آوردن موس بر روی لینک متن شما در زیر آن
ضاهر می شود
<!-- Start of MouseOver Text Appear 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 -->
<html>
<head>
<TITLE>menu visibility</title>
<style type="text/css">
.Menu {
position: absolute;
width: 80%;
border: 1px white;
background-color: white;
layer-background-color: white;
top: 100px;
left : 10%;
line-height : 25px;
font-family : Arial;
visibility: hidden;
}
.Mo {
position: absolute;
text-decoration : none;
border: 0px white;
background-color: white;
layer-background-color: white;
top: 100px;
left: 10%;
width: 80%;
font-family : Arial;
visibility: hidden;
}
.hide {
visibility: hidden;
font-family : Arial;
}
</style>
<script>
var mo_lastMenu;
var lastMenu = "null";
if (document.layers) {
visible = 'show'; hidden = 'hide';
}
else if (document.all) {
visible = 'visible'; hidden = 'hidden';
}
function toggle(menu) {
if (document.layers) {
Menu = document.layers[menu];
}
else if (document.all) {
Menu = document.all(menu).style;
}
if (Menu.visibility == visible) {
Menu.visibility = hidden;
}
else {
clean(lastMenu);
Menu.visibility = visible;
}
lastMenu = Menu;
}
function clean(Menu){
if (Menu == "null"){
return;
}
if (Menu.visibility == visible) {
Menu.visibility = hidden;
}
}
function mo_toggle(menu) {
if (document.layers) {
Menu = document.layers[menu];
}
else if (document.all) {
Menu = document.all(menu).style;
}
if (Menu.visibility == visible) {
Menu.visibility = hidden;
}
else {
Menu.visibility = visible;
}
mo_lastMenu = Menu;
}
</script>
</head>
<body bgcolor="White">
<CENTER>
<A href="#" onclick="toggle('clickWeb');return false;" onmouseout="javascript:mo_toggle('mo_web');return false;" onmouseover="javascript:mo_toggle('mo_web');return false;" >
<B><font size="+1" color="purple" face="Arial">Put Mouse Over Here here</A></B></FONT>
</CENTER>
<div id="mo_web" class="Mo">
<FONT SIZE="+2" COLOR="green" face="Arial"><CENTER>
This is what happens!!
</FONT></CENTER>
</div>
<div id="clickWeb" class="Menu">
<FONT SIZE="+2" COLOR="red" face="Arial"><CENTER>
Clicking the link presents these results.
</FONT></CENTER>
</div>
<BR>
</body>
</html>
<!-- End of MouseOver Text Appear JavaScript -->
**********************************************************
85- متن های پشت سر هم به صورت پیغام
<!-- Start of Murphy's Laws JavaScript -->
<!-- Randomly displays different sections of Murphy's Laws -->
<!-- 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_Message() {
var ar = new Array(20)
ar[0] = "Nothing is as easy as it looks."
ar[1] = "Everything takes longer than you think."
ar[2] = "Anything that can go wrong will go wrong."
ar[3] = "If there is a possibility of several things going wrong, the one that will cause the most damage will be the one to go wrong."
ar[4] = "If there is a worse time for something to go wrong, it will happen then."
ar[5] = "If anything simply cannot go wrong, it will anyway."
ar[6] = "If you perceive that there are four possible ways in which a procedure can go wrong, and circumvent these, then a fifth way, unprepared for, will promptly develop."
ar[7] = "Left to themselves, things tend to go from bad to worse."
ar[8] = "If everything seems to be going well, you have obviously overlooked something."
ar[9] = "Nature always sides with the hidden flaw."
ar[10] = "Mother nature is a bitch."
ar[11] = "It is impossible to make anything foolproof because fools are so ingenious."
ar[12] = "Whenever you set out to do something, something else must be done first."
ar[13] = "Every solution breeds new problems."
ar[14] = "Trust everybody ... then cut the cards."
ar[15] = "Two wrongs are only the beginning."
ar[16] = "If at first you don't succeed, destroy all evidence that you tried."
ar[17] = "To succeed in politics, it is often necessary to rise above your principles."
ar[18] = "Exceptions prove the rule ... and wreck the budget."
ar[19] = "Success always occurs in private, and failure in full view."
var now = new Date()
var sec = now.getSeconds()
alert("Murphy's Law:\r" + ar[sec % 20])
}
// End -->
</SCRIPT>
<BODY onLoad="CC_Message()">
<CENTER>
<FORM>
<input type="button" Value="New Murphy's Law" onClick="CC_Message()">
</FORM>
</CENTER>
<!-- End of Murphy's Laws JavaScript -->
**********************************************************
86- رقص متن در استاتوس بار1
<!-- Status Bar Scroller
A simple status bar text scroll
-->
<BODY onLoad="coffeescroll(100)">
<SCRIPT>
<!--
function coffeescroll(seed) {
var m1 = "Visit the CoffeeCup Software WebPage!";
var m2 = " Your source for the best Web Tool Software!";
var m3 = " http://www.coffeecup.com";
var m4 = "";
var msg=m1+m2+m3+m4;
var out = " ";
var c = 1;
if (seed > 100) {
seed--;
cmd="coffeescroll("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
window.status=out;
cmd="coffeescroll("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
window.status=out;
cmd="coffeescroll("+seed+")";
timerTwo=window.setTimeout(cmd,100);
}
else {
window.status=" ";
timerTwo=window.setTimeout("coffeescroll(100)",75);
}
}
}
//-->
</SCRIPT>
**********************************************************
87- رقص متن در استاتوس بار2
<!-- Start of Typing Text Script -->
<!-- This types one letter at a time in the Status bar -->
<!-- Instructions: Just put this script anywhere on your webpage
and you will have the typewriter effect on your messages
displayed in the status bar.
To change the speed of your banner increase or decrease the
value for 'var speed'.
(Note: decreasing this value increases the speed of your banner.)
To change the pause between each message change the value
for 'var pause'.
(Note: increase value to increase pause.)
-->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<SCRIPT LANGUAGE="JavaScript">
var speed = 100
var pause = 1000
var timerID = null
var texttype = false
var ar = new Array()
ar[0] = "This is the Typing Text Javascript"
ar[1] = "CoffeeCup Software is cool!"
ar[2] = "El HTML Editor++ es muy bueno!"
var msgnow = 0
var offset = 0
function stopBanner() {
if (texttype)
clearTimeout(timerID)
texttype = false
}
function startBanner() {
stopBanner()
showBanner()
}
function showBanner() {
var text = ar[msgnow]
if (offset < text.length) {
if (text.charAt(offset) == " ")
offset++
var partialMessage = text.substring(0, offset + 1)
window.status = partialMessage
offset++
timerID = setTimeout("showBanner()", speed)
texttype = true
} else {
offset = 0
msgnow++
if (msgnow == ar.length)
msgnow = 0
timerID = setTimeout("showBanner()", pause)
texttype = true
}
}
</SCRIPT>
</HEAD>
<BODY onLoad="startBanner()">
</BODY>
</HTML>
<!-- END OF SCRIPT -->
<!/SCRIPT>
**********************************************************
88- رقص متن در استاتوس بار3
<!-- DESCRIPTION: This script will make your status message slide into place. Neat effect.
INSTRUCTIONS: Place this script in the BODY tags of
your webpage. Then place the appropriate message in the var msg value.
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 onLoad="timerONE=window.setTimeout('slide(120,0)',20);">
<SCRIPT LANGUAGE="JavaScript">
function slide(jumpSpaces,position) {
var msg = "This JavaScript will slide in your desired message....Cool...isn't it???.......drink more coffee"
var out = ""
if (endScroll) {return false}
for (var i=0; i<position; i++)
{out += msg.charAt(i)}
for (i=1;i<jumpSpaces;i++)
{out += " "}
out += msg.charAt(position)
window.status = out
if (jumpSpaces <= 1) {
position++
if (msg.charAt(position) == ' ')
{position++ }
jumpSpaces = 100-position
} else if (jumpSpaces > 3)
{jumpSpaces *= .75}
else
{jumpSpaces--}
if (position != msg.length) {
var cmd = "slide(" + jumpSpaces + "," + position + ")";
scrollID = window.setTimeout(cmd,5);
} else {
scrolling = false
return false
}
return true
}
function ccSetup() {
if (scrolling)
if (!confirm('Re-initialize slide?'))
return false
endScroll = true
scrolling = true
var killID = window.setTimeout('endScroll=false',6)
scrollID = window.setTimeout('slide(100,0)',10)
return true
}
var scrollID = Object
var scrolling = false
var endScroll = false
</SCRIPT>
**********************************************************
89- رقص متن در استاتوس بار4
<!-- DESCRIPTION: This will make your status banner scrabble together.
INSTRUCTIONS: Place this script in the HEAD tags of
your webpage. Then place the appropriate messages in the areas below.
FUNCTIONALITY: Works in both Netscape and 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.
<!--
var speed = 13
var pause = 1333
var timerID = null
var scrabbleBanner = false
var cc = new Array()
cc[0] = "*********CoffeeCup Software*********"
cc[1] = "Your First Message"
cc[2] = "Your Second Message"
cc[3] = "Your Third Message"
var message = 0
var state = ""
newBanner()
function stopBanner() {
if (scrabbleBanner)
clearTimeout(timerID)
scrabbleBanner = false
}
function firstBanner() {
stopBanner()
seeBanner()
}
function newBanner() {
state = ""
for (var i = 0; i < cc[message].length; ++i) {
state += "0"
}
}
function seeBanner() {
if (getString()) {
message++
if (cc.length <= message)
message = 0
newBanner()
timerID = setTimeout("seeBanner()", pause)
scrabbleBanner = true
} else {
var str = ""
for (var c = 0; c < state.length; ++c) {
str += (state.charAt(c) == "1") ? cc[message].charAt(c) : " "
}
window.status = str
timerID = setTimeout("seeBanner()", speed)
scrabbleBanner = true
}
}
function getString() {
var full = true
for (var c = 0; c < state.length; ++c) {
if (state.charAt(c) == 0)
full = false
}
if (full)
return true
while (1) {
var num = getRandom(cc[message].length)
if (state.charAt(num) == "0")
break
}
state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)
return false
}
function getRandom(max) {
return Math.round((max - 1) * Math.random())
}
// -->
</SCRIPT>
</HEAD>
<BODY onLoad="firstBanner()">
**********************************************************
90- رقص متن در استاتوس بار5
<!-- DESCRIPTION: This will make your text bounce in the
status bar of the browser.
INSTRUCTIONS: Place this script in the HEAD tags of
your webpage. Then place the text you want to be bounced in
the area that says, "YOUR MESSAGE HERE".
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.
var yourtext = "* YOUR MESSAGE HERE! *";
var wedge1=" ";
var wedge2=" ";
var message1=wedge1+yourtext+wedge2;
var dir = "lside";
var speed = 50;
function bouncey() {
if (dir == "lside") {
message2=message1.substring(2,message1.length)+" ";
window.status=message2;
setTimeout("bouncey();",speed);
message1=message2;
if (message1.substring(0,1) == "*") {
dir="rside";
}
}
else {
message2=" "+message1.substring(0,message1.length-2);
window.status=message2;
setTimeout("bouncey();",speed);
message1=message2;
if (message1.substring(message1.length-1,message1.length) == "*") {
dir="lside";
}
}
}
// -- End Hiding Here -->
</SCRIPT>
<body onLoad="bouncey()">
**********************************************************
91-
مرلین - عروسک کوچک سخنگو در
سایت
<OBJECT id=wolfi classid=CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F>></OBJECT>
<SCRIPT language=JavaScript type=text/javascript>
function LoadLocalAgent(CharID, CharACS) {
LoadReq = wolfi.Characters.Load(CharID, CharACS);
return(true);
}
var MerlinID;
var MerlinACS;
wolfi.Connected = true;
MerlinLoaded = LoadLocalAgent(MerlinID, MerlinACS);
Merlin = wolfi.Characters.Character(MerlinID);
Merlin.Show();
Merlin.Play("Surprised");
Merlin.speak("hi dear");
Merlin.MoveTo (350,250);
Merlin.Play("Surprised");
Merlin.Play("GetAttention");
Merlin.Play("Blink"); Merlin.Play("Blink");
Merlin.speak(" Welcome to <#user#> ");
Merlin.Play("Blink"); Merlin.Play("Confused");
Merlin.speak("i hope enjoy to this website");
Merlin.speak("created by HULK");
Merlin.Play('GestureLeft');
Merlin.Play("Blink")
Merlin.Hide();
</SCRIPT>
**********************************************************
92- برداشتن تبلیغات بلاگ اسکای
<body onload="javascript: document.getElementById('r74j').style.visibility = 'hidden';" href="javascript:void(0);">
**********************************************************
93- نشانگر مشخصات جستجوگر
<font size=2>
<SCRIPT language=JavaScript>
<!-- Begin
var xy = navigator.appVersion;
xz = xy.substring(22,25);
document.write("مرورگر شما : ", navigator.appName,"<br>");
document.write("نگارش : ",xz,"<br>");
document.write("وضوح نمايشگر شما : ",screen.width," در ",screen.height,"پيکسل<br>");
if (navigator.javaEnabled()) document.write("جاوا فعال است<br>");
else document.write("جاوا فعال نیست<br>")
// End -->
</SCRIPT> </font>
**********************************************************
94- پخش اتوماتیک موزیک در صفحه
<SCRIPT>
<!--
//By George Chiang (http://www.kodhaye-weblog.persianblog.com) More JavaScripts here!
var sound1="http://www.naghmeh.com/Naghmehcard/MIDI/golegoldoon_siminghanem.mid"
var sound2="http://www.naghmeh.com/Naghmehcard/MIDI/chesheman_Darush.mid"
var sound3="http://www.naghmeh.com/Naghmehcard/MIDI/elahennaz_banan.mid"
var x=Math.random()*10
if (x<=3) x=sound1
else if (x<=6) x=sound2
else
x=sound3
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+x+'"'+' loop="infinite">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0" width="20" height="20" autostart="true" loop="true">')
//-->
</SCRIPT>
**********************************************************
95- جستجوگر گوگل
<!-- Search Google -->
<center>
<FORM method=GET action="http://www.google.com/search">
<TABLE bgcolor="#FFFFFF"><tr><td>
<A HREF="http://www.google.com/">
<IMG SRC="http://www.google.com/logos/Logo_40wht.gif" <br>border="0" ALT="Google" align="absmiddle"></A>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=hl value="en">
<INPUT type=submit name=btnG VALUE="Google Search">
</td></tr></TABLE>
</FORM>
</center>
<!-- Search Google -->
**********************************************************
96- جستجوگر ام اس ان
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
</head>
<body>
<table BORDER="0" WIDTH="222" HEIGHT="18">
<tr>
<td WIDTH="214" HEIGHT="10">
<form NAME="search" ID="search" ACTION="http://search.msn.com/results.asp" METHOD="get">
<p><a HREF="http://www.msn.com">
<img SRC="http://go.msn.com/AG/E/0.asp" width="61" height="33" BORDER="0" ALT="Go to msn.com"></a><font FACE="arial" SIZE="2"><strong>Search
<font COLOR="#808080">the Web for:</font></strong></font><br>
<input TYPE="text" ID="q" SIZE="18" MAXLENGTH="251" NAME="q" VCARD_NAME="SearchText"><input TYPE="submit" VALUE="Search" NAME="B1"><input TYPE="hidden" NAME="FORM" VALUE="FRNT"><input TYPE="hidden" NAME="un" VALUE="doc"><input TYPE="hidden" NAME="v" VALUE="1"></p>
</form>
</td>
</tr>
<tr>
<td WIDTH="214" HEIGHT="21" VALIGN="bottom">
<p ALIGN="center"><font SIZE="1" FACE="arial">
<a HREF="http://search.msn.com/advanced.asp?MT=&RS=CHECKED&Form=FRNT">Use
Advanced Search</a></font></td>
</tr>
</table>
<p> </p>
</body>
</html>
</body>
</html>
**********************************************************
97- افکت رقص نور به متن
<meta http-equiv="Content-Language" content="en-us">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function initArray() {
for (var i = 0; i < initArray.arguments.length; i++) {
this[i] = initArray.arguments[i];
}
this.length = initArray.arguments.length;
}
var colors = new initArray(
"red",
"blue",
"green",
"purple",
"black",
"tan",
"red");
delay = .5; // seconds
link = 0;
vlink = 2;
function linkDance() {
link = (link+1)%colors.length;
vlink = (vlink+1)%colors.length;
document.linkColor = colors[link];
document.vlinkColor = colors[vlink];
setTimeout("linkDance()",delay*1000);
}
linkDance();
// End -->
</script></body>
<p align="center"><font face="Tahoma" style="font-size: 30pt; font-weight: 700">
<a href="http://www.webloger.5u.com/" style="text-decoration: none">Created By HULK
</a></font></p>
</html>
**********************************************************
98- وقت بخیر فارسی
<TBODY>
<TR>
<TD width="100%" align="right" valign="center" height="46">
<td width="100%" ><img src="http://members.lycos.co.uk/hashjen/jam.jpg"</td>
</TD>
<TD bgColor=#f0f1f5 colSpan=2 width="280" height="3">
<IMG height=1 alt="" hspace=0
src="templates/public/cyber/images/pixel.gif" width=1 border=0></TD></TR>
<TR vAlign=center bgColor=#e0e2eb>
<TD vAlign=top align=left width=2 height=1>
<IMG
src="templates/public/cyber/images/topnav-left.gif" width="8" height="22"></TD>
<TD align=middle width="116"
background="templates/public/cyber/images/topnav-bg.gif" height=5>
<P> <FONT color=#3B9812 size=3>
<SCRIPT language=javascript type=text/javascript>
now = new Date
if (now.getHours() < 5) {
document.write("!!نصف شب بخیر")
}
else if (now.getHours() < 11) {
document.write("!!صبح بخیر")
}
else if (now.getHours() < 15) {
document.write("!!ظهر بخیر")
}
else if (now.getHours() < 20) {
document.write("!!عصر بخیر")
}
else if (now.getHours() < 24) {
document.write("!!شب بخیر")
}
**********************************************************
100- لرزش موقت جستجوگر
<!-- START CODE Powered javascript code by www.webloger.5u.com-->
<meta http-equiv="Content-Language" content="en-us">
<SCRIPT language=JavaScript>
<!-- Begin
function shake(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
}
}
}
}
// End -->
<!--
shake(1);
//-->
</SCRIPT>
<!-- END CODE Powered javascript code by www.webloger.5u.com--></body>
</html>
</body>
</html>
</body>
<p align="center">
<a href="http://www.webloger.5u.com" style="text-decoration: none">
<span style="font-weight: 700"><font face="Tahoma" size="2" color="#008000">
W</font></span></a><a href="http://www.webloger.5u.com" style="text-decoration: none; font-weight: 700"><font face="Tahoma" size="2" color="#008000">ebloger
Website</font></a></p>
</html>
**********************************************************