توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : کدهای جاوا اسکریپ
uody
3rd April 2011, 05:37 PM
کدهای جاوا اسکریپ
کد شماره ی 1 کد دکمه ای در حال حرکت
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!--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>
uody
3rd April 2011, 05:38 PM
کد شماره ی 2 کد امکان ارسال ایمیل
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- 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.khafankadeh.7p.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()">
uody
3rd April 2011, 05:40 PM
کد شماره ی 3 کد ماشین حساب در سایت
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- Start of CoffeeCup Calculator Script -->
<!-- A Simple Calculator -->
<!-- Instructions: Just put this script anywhere on your webpage
between the body tags and you will have a calculator for your visitors! -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<CENTER>
<FORM name="Keypad" action="">
<TABLE>
<B>
<TABLE border=2 width=50 height=60 cellpadding=1 cellspacing=5>
<TR>
<TD colspan=3 align=middle>
<input name="ReadOut" type="Text" size=24 value="0" width=100%>
</TD>
<TD
</TD>
<TD>
<input name="btnClear" type="Button" value=" C " onclick="Clear()">
</TD>
<TD><input name="btnClearEntry" type="Button" value=" CE " onclick="ClearEntry()">
</TD>
</TR>
<TR>
<TD>
<input name="btnSeven" type="Button" value=" 7 " onclick="NumPressed(7)">
</TD>
<TD>
<input name="btnEight" type="Button" value=" 8 " onclick="NumPressed(8)">
</TD>
<TD>
<input name="btnNine" type="Button" value=" 9 " onclick="NumPressed(9)">
</TD>
<TD>
</TD>
<TD>
<input name="btnNeg" type="Button" value=" +/- " onclick="Neg()">
</TD>
<TD>
<input name="btnPercent" type="Button" value=" % " onclick="Percent()">
</TD>
</TR>
<TR>
<TD>
<input name="btnFour" type="Button" value=" 4 " onclick="NumPressed(4)">
</TD>
<TD>
<input name="btnFive" type="Button" value=" 5 " onclick="NumPressed(5)">
</TD>
<TD>
<input name="btnSix" type="Button" value=" 6 " onclick="NumPressed(6)">
</TD>
<TD>
</TD>
<TD align=middle><input name="btnPlus" type="Button" value=" + " onclick="Operation('+')">
</TD>
<TD align=middle><input name="btnMinus" type="Button" value=" - " onclick="Operation('-')">
</TD>
</TR>
<TR>
<TD>
<input name="btnOne" type="Button" value=" 1 " onclick="NumPressed(1)">
</TD>
<TD>
<input name="btnTwo" type="Button" value=" 2 " onclick="NumPressed(2)">
</TD>
<TD>
<input name="btnThree" type="Button" value=" 3 " onclick="NumPressed(3)">
</TD>
<TD>
</TD>
<TD align=middle><input name="btnMultiply" type="Button" value=" * " onclick="Operation('*')">
</TD>
<TD align=middle><input name="btnDivide" type="Button" value=" / " onclick="Operation('/')">
</TD>
</TR>
<TR>
<TD>
<input name="btnZero" type="Button" value=" 0 " onclick="NumPressed(0)">
</TD>
<TD>
<input name="btnDecimal" type="Button" value=" . " onclick="Decimal()">
</TD>
<TD colspan=3>
</TD>
<TD>
<input name="btnEquals" type="Button" value=" = " onclick="Operation('=')">
</TD>
</TR>
</TABLE>
</TABLE>
</B>
</FORM>
</CENTER>
<font face="Verdana, Arial, Helvetica" size=2>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var FKeyPad = document.Keypad;
var Accumulate = 0;
var FlagNewNum = false;
var PendingOp = "";
function NumPressed (Num) {
if (FlagNewNum) {
FKeyPad.ReadOut.value = Num;
FlagNewNum = false;
}
else {
if (FKeyPad.ReadOut.value == "0")
FKeyPad.ReadOut.value = Num;
else
FKeyPad.ReadOut.value += Num;
}
}
function Operation (Op) {
var Readout = FKeyPad.ReadOut.value;
if (FlagNewNum && PendingOp != "=");
else
{
FlagNewNum = true;
if ( '+' == PendingOp )
Accumulate += parseFloat(Readout);
else if ( '-' == PendingOp )
Accumulate -= parseFloat(Readout);
else if ( '/' == PendingOp )
Accumulate /= parseFloat(Readout);
else if ( '*' == PendingOp )
Accumulate *= parseFloat(Readout);
else
Accumulate = parseFloat(Readout);
FKeyPad.ReadOut.value = Accumulate;
PendingOp = Op;
}
}
function Decimal () {
var curReadOut = FKeyPad.ReadOut.value;
if (FlagNewNum) {
curReadOut = "0.";
FlagNewNum = false;
}
else
{
if (curReadOut.indexOf(".") == -1)
curReadOut += ".";
}
FKeyPad.ReadOut.value = curReadOut;
}
function ClearEntry () {
FKeyPad.ReadOut.value = "0";
FlagNewNum = true;
}
function Clear () {
Accumulate = 0;
PendingOp = "";
ClearEntry();
}
function Neg () {
FKeyPad.ReadOut.value = parseFloat(FKeyPad.ReadOut.value) * -1;
}
function Percent () {
FKeyPad.ReadOut.value = (parseFloat(FKeyPad.ReadOut.value) / 100) * parseFloat(Accumulate);
}
// End -->
</SCRIPT>
uody
3rd April 2011, 05:41 PM
کد شماره ی 4 کد نمایش متن ها به طور زیبا
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- Start of Fade In and Out JavaScript-->
<!-- Place this entire script into a new webpage and then work off the example. Do not -->
<!-- try to incorporate into an existing webpage, else you may disrupt the Script -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<HTML>
<HEAD>
<style type="text/css">
<!--
#fadeMe01 { position: absolute; visibility: visible; width: 410px }
#fadeMe02 { position: absolute; visibility: visible; width: 400px }
.content { font: 16pt Verdana, Arial, Helvetica; width: 400px; text-align: center }
.content1 { font: 16pt Verdana, Arial, Helvetica; width: 400px; text-align: center }
.small { font: 6pt Verdana, Arial, Helvetica; width: 400px; text-align: center }
b { font-weight: bold }
a { text-decoration : none }
// -->
</style>
<script type="text/javascript" language="javascript">
<!--
var idme=908601;
var convert = new Array();
var hexbase = new Array("0", "1", "2", "3", "4", "5", "6", "7",
"8", "9", "A", "B", "C", "D", "E", "F");
var value=0;
var rgb;
for (x=0; x<16; x++)
for (y=0; y<16; y++) {
convert[value] = hexbase[x] + hexbase[y];
value++;
}
var timerID = null, timerRunning = false;
function stopClock(){
if(timerRunning)
clearTimeout(timerID)
timerRunning = false
}
var layers = document.layers;
var style = document.all;
var both = layers || style;
if (layers) { layerRef = 'document.layers'; styleRef = ''; }
if (style) { layerRef = 'document.all'; styleRef = '.style'; }
function moveLayer(obj, topx, leftx) {
if (both) {
eval(layerRef + '["'+obj+'"]' + styleRef + '.top = topx');
eval(layerRef + '["'+obj+'"]' + styleRef + '.left = leftx');
}
}
var s1, s2, s3, s2r, s2g, s2b, smallest;
function hexToDec(hex) { var value=0; while (true) { if (convert[value] == hex) break; value++; } return value; }
function writeOn(obj, str) {
if (layers) with (document[obj]) {
document.open();
document.write(str);
document.close();
}
if (style) {
eval(obj+'.innerHTML= str');
}
}
function changeColor(obj, str, rgb1, speed, counter) {
if (counter < smallest) {
stopClock();
if (layers) with (document[obj]) { document.open(); document.linkColor = rgb1; document.fgColor = rgb1; document.write(str); document.close(); }
if (style) { eval(obj+'.document.linkColor= rgb1');
eval(obj+'.innerHTML= "<font color="+rgb1+">"+str+"<\/font>"');
// eval(layerRef + '["'+obj+'"]' + styleRef + '.color= rgb1');
}
s2r+=s1; s2g+=s2; s2b+=s3;
tempR = Math.round(s2r); tempG = Math.round(s2g); tempB = Math.round(s2b);
if (tempR <= 0) tempR = 0; if (tempG <= 0) tempG = 0; if (tempB <= 0) tempB = 0;
if (tempR >= 255) tempR = 255; if (tempG >= 255) tempG = 255; if (tempB >= 255) tempB = 255;
rgb1 = convert[tempR] + convert[tempG] + convert[tempB];
counter++;
timerID = setTimeout('changeColor("'+obj+'", "'+str+'", "'+rgb1+'", '+speed+', '+counter+')', speed);
timerRunning = true;
}
}
function fadeText(obj, str, rgb1, rgb2, speed, step) {
var r1, g1, b1, r2, g2, b2;
for (cnt=1; cnt<=2; cnt++) {
eval('r'+cnt+' = hexToDec(rgb'+cnt+'.slice(0,2));');
eval('g'+cnt+' = hexToDec(rgb'+cnt+'.slice(2,4));');
eval('b'+cnt+' = hexToDec(rgb'+cnt+'.slice(4,6));');
}
with (Math) {
s2r = r1; s2g = g1; s2b = b1;
s1 = abs(r1 - r2); s2 = abs(g1 - g2); s3 = abs(b1 - b2);
if (s1 > s2 && s1 > s3) { smallest = s1; } else if (s2 > s1 && s2 > s3) { smallest = s2; } else { smallest = s3; }
s1 = (s1 == 0) ? 0 : s1/smallest; s2 = (s2 == 0) ? 0 : s2/smallest; s3 = (s3 == 0) ? 0 : s3/smallest;
s1*=step; s2*=step; s3*=step;
if (r1 > r2) { s1 = -s1; } if (g1 > g2) { s2 = -s2; } if (b1 > b2) { s3 = -s3; }
smallest= Math.round(smallest/step);
}
if (both) { changeColor(obj, str, rgb1, speed, 0); } else { document.write("Err. for some reason you tried viewing this page with a browser that doesn`t support javascript/CSS block support"); }
}
function getMid() { tvAgent = navigator.userAgent; if (layers) { maxX = innerWidth; maxY = innerHeight; } if (style) { maxX = document.body.clientWidth; maxY = document.body.clientHeight; } if (tvAgent.indexOf("WebTV") != -1) { maxX = 544; maxY = 378; } midX = maxX/2; midY = maxY/2; }
function layout() { getMid(); moveLayer('fadeMe01', midY-50, midX-200);
fadeText("fadeMe01", "<span class=content>NOW PRESENTING</span><div class=small>by popular demand</div>", "000000", "CCCCCC", 10, 2);
setTimeout('fadeText("fadeMe01", "<span class=content>FADE IN AND OUT JavaScript</span><div class=small>A neat JavaScript</div>", "CCCCCC", "000000", 10, 4)',8000);
setTimeout('fadeText("fadeMe01", "<div class=small>A</div><span class=content>It is COOL</span>", "000000", "CCCCFF", 10, 2)',12000);
setTimeout('fadeText("fadeMe01", "<div class=small>A</div><span class=content>Easy to Use</span>", "CCCCFF", "000000", 10, 4)',20000);
setTimeout('moveLayer("fadeMe01", midY-100, midX-200)',24000);
setTimeout('moveLayer("fadeMe02", midY-60, midX-200)',24000);
setTimeout('fadeText("fadeMe01", "<span class=content>This line could be Sentence Line 1.</span>", "000000", "CCCCFF", 10, 4)',26000);
setTimeout('fadeText("fadeMe02", "<span class=content>Sentence Line 2.</span>", "000000", "9999FF", 10, 4)',32000);
setTimeout('fadeText("fadeMe01", "<span class=content>Sentence Line 3.</span>", "CCCCFF", "FF0000", 10, 4)',36000);
setTimeout('fadeText("fadeMe02", "<span class=content>Imagine the envy your friends will feel.</span>", "9999FF", "99FF33", 10, 4)',40000);
setTimeout('fadeText("fadeMe02", "<span class=content>Sentence Line 5.</span>", "99FF33", "CCCCCC", 10, 4)',44000);
setTimeout('fadeText("fadeMe02", "<span class=content>You can now make neat looking text displays.</span>", "CCCCCC", "000000", 10, 4)',48000);
setTimeout('fadeText("fadeMe02", "<span class=small>Sentence Line 7.</div>", "000000", "CCCCCC", 10, 4)',52000);
setTimeout('fadeText("fadeMe01", "<span class=content>-END-</div>", "000000", "FF0000", 10, 4)',57500);
}
// -->
</script>
</HEAD>
<BODY BGCOLOR="#000000" text="#CCCCCC" link="#FFFFFF" vlink="#FFFFFF" onload="layout()">
<div id=fadeMe01></div>
<div id=fadeMe02></div>
<noscript>
Silly! you'll need to have javascript enabled and
you must have <a href="http://www.microsoft.com/">Internet Explorer 4</a> or <a href="http://developer.netscape.com">Netscape Navagitor 4</a>
or <a href="http://developer.webtv.net">WebTV</a>(?) for this script to work.
</noscript>
</BODY>
</HTML>
<!-- End of Fade In and Out JavaScript-->
uody
3rd April 2011, 05:42 PM
کد شماره ی 5 کد تغییر رنگ پشت صفحه بر اساس کد رنگ
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- Start Of Fading Background Script -->
<!-- Instructions: Just put this script on your webpage and the background
color will change with a display of what the current hex code is.
-->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<SCRIPT Language = "JavaScript">
start = new Date();
minstart = start.getMinutes()
secstart = start.getSeconds()
function brighter(){
var now = new Date();
var seconds = now.getSeconds();
var minutes = now.getMinutes();
var base = "00";
var color = 1000;
var interval = 103;
var sec= interval * (seconds - secstart);
var min= 60 * interval * (minutes - minstart);
var add= color + min + sec;
total= base + add;
if (add>=9999) {secstart = seconds; minstart = minutes}
document.bgColor = total;
setTimeout("brighter()", 1000);
document.coffeeform.cc.value = total;
}
</script>
</HEAD>
<body onLoad = "brighter()" text="white" LINK="C0C0C0" VLINK="C0C0C0">
<form name="coffeeform">
<P>This is the hex code of the current background color
<input name = "cc" type="text" size="7">
</form>
uody
3rd April 2011, 05:43 PM
کد شماره ی 6 کد برای از چپ به راست بردن اسکرول
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- DESCRIPTION: This will make your webpage slide to the right
automatically upon loading of the webpage.
INSTRUCTIONS: Place this script in the HEAD tags of
your webpage. Place your message (WITHOUT ANY SPACES OR BREAKS)
in the page below the BODY tag. Sentences must be continuous or
the script will not work. (Example: Hi.....this....is....a...continuous...sentence..)
If you find the script stopping before it finishes your sentence, change the
H<=4000 variable to a larger number.
FUNCTIONALITY: Works only in NETSCAPE.
-->
<HEAD>
<SCRIPT Language="JavaScript">
//Modified by CoffeeCup Software
//This code is Copyright (c) 1997 CoffeeCup Software
//all rights reserved. License is granted to a single user to
//reuse this code on a personal or business Web Site.
<!--
function coffeeit(){
for (H=0; H<=3000; H++){
parent.scroll(H,0)
}
}
//-->
</SCRIPT>
</HEAD>
<BODY OnLoad="coffeeit()" BGCOLOR=#000000 TEXT=#FFFFFF LINK=#FF0000 VLINK=#FF0000 ALINK=#FF0000>
<P><P><P><BR><BR><BR><P><P><P><BR><BR><BR><P><P><P><P><BR><BR><BR><P><P><P>
<FONT SIZE=5 FACE=ARIAL BLACK>.................................................. .................This..Javascript..allows..the..us er..to..slide..through..your..webpage.....You..can ..also..end..it..with..a..<A HREF="http://www.khafankadeh.7p.com/">link</A>..!</FONT>
uody
3rd April 2011, 05:44 PM
کد شماره ی 7 کد نمایش متن متحرک در نوت پد
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- A Script that types in a box that looks like notepad very cool
The speed of the typing can be adjusted by raising
or lowering the number in the setTimeout function.
-->
<script language="JavaScript">
function makeArray()
{
this.length = makeArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = makeArray.arguments[i]
}
var fArray = new makeArray;
fArray[0]="Message www.khafankade.7p.com goes here. "
fArray[1]="Message www.khafankade.7p goes here. "
fArray[2]="Message 3 goes here. "
fArray[3]="Message 4 goes here. "
var x = 1;
var y = 0;
var msg1 = fArray[y];
function newsFeed()
{
if (x==msg1.length+1)
{
for (var z=0; z < 7000; z++);
y+=1;
if (y > 3) y=0;
document.form1.news2.value=' ';
msg1 = fArray[y];
x=0;
}
document.form1.news2.value=msg1.substring(0,x);
x+=1;
setTimeout("newsFeed() ",1);
}
</script>
<body bgcolor=teal link=goldenrod onLoad="newsFeed()">
<form name="form1">
<textarea wrap=physical rows=10 cols=25 name="news2">
uody
3rd April 2011, 05:45 PM
کد شماره ی 8 کد اطلاعاتی در مورد صفحه
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- BORN ON DATE:
Let your users know if your site
has changed since their last visit
-->
<BODY>
<CENTER>
<TABLE border=2 cellspacing=0 cellpadding=3>
<TR><TD bgcolor="#000044">
<FONT color="#4400ff" face=georgia,arial size=+1>
<CENTER>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write(document.title);
//-->
</SCRIPT>
</TD></TR>
<TR><TD bgcolor="#336699">
<FONT size=-1 color="#66ccff" face="trebuchet MS","arial">
<FONT color="#66ccff">Born on:</font>
<!-- Put the page creation date, here. -->
May 11, 1979
<BR>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie(name) {
var exp = new Date();
FixCookieDate (exp);
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
if (cval != null)
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var cookie_date=new Date(document.lastModified);
var expdate = new Date();
expdate.setTime(expdate.getTime()+(5*24*60*60*1000 ));
document.write("<Font color=66ccff>" + "Last updated: "+ "</font>" +document.lastModified);
document.write("");
if (!(cookie_date == GetCookie("cookie_date"))){
SetCookie("cookie_date",cookie_date,expdate);
document.write("<font color='#66ccff'><br>Site has changed since last visit!</font><br>");
}
// End -->
</SCRIPT>
</FONT>
</TD></TR>
</TABLE>
</CENTER>
uody
3rd April 2011, 05:46 PM
کد شماره ی 9 کد نشان دهنده مدت زمان به وجود آمدن صفحه
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- Page Age Script
This script will display to your users
how long in years, months, days your
site has been active
-->
<SCRIPT LANGUAGE="JavaScript">
function DateEstablished(startmonth, startdate, startyear) {
sdate=startdate;
smonth=startmonth-1;
syear=startyear;
var DaysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
today = new Date()
var thisyear = today.getFullYear();
var thismonth = today.getMonth();
var thisdate = today.getDate();
mstart = new Date(syear,(smonth==12?1:smonth+1),1);
days1 = (mstart - new Date(syear,smonth,sdate))/(24*60*60*1000)-1;
mend = new Date(thisyear,thismonth,1);
days2 = (new Date(thisyear,thismonth,thisdate) - mend)/(24*60*60*1000)+1;
dayst = days1 + days2;
if (dayst >= DaysInMonth[smonth]) {
AddOneMonth = 1;
dayst -= DaysInMonth[smonth];
}
else AddOneMonth = 0;
ydiff1 = thisyear-mstart.getFullYear();
mdiff1 = thismonth-mstart.getMonth()+AddOneMonth;
if (mdiff1 >11) { mdiff1=0; ydiff1++; }
if (mdiff1 < 0) { mdiff1 = mdiff1 + 12; ydiff1--; }
temp = (ydiff1==0?"":(ydiff1==1?ydiff1+" year and ":ydiff1 + " years, "));
temp += (mdiff1==0?"0 months, and ":(mdiff1==1?mdiff1+" month, and ":mdiff1+" months, and "));
temp += (dayst==0?"no days":(dayst==1 ? " 1 day." : dayst + " days." ));
return temp;
}
</script>
<!-- Copy this into the BODY of your HTML document -->
<SCRIPT LANGUAGE="JavaScript">
document.write("My Website has been in existence for ");
document.write("<font color=red>");
document.write(DateEstablished(06,09,69));
// Enter the dates your site was created. day,month,year
document.write("</font>");
</script>
uody
3rd April 2011, 05:47 PM
کد شماره ی 10 کد نشان دهنده تصویر
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- 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>
uody
3rd April 2011, 08:55 PM
کد شماره ی 11 کد منوی کشویی لینک که با کلیک بلافاصله وارد لینک شود
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- ClickJump LinkBox Change the VALUES to your links! -->
<!-- When the User selects an item, it will automatically jump to that link. -->
<CENTER>
<FONT FACE="VERDANA, ARIAL">Select an item:</FONT><BR>
<FORM>
<SELECT NAME="clicklist" onChange="top.location.href=this.form.clicklist.options[this.form.clicklist.selectedIndex].value">
<OPTION selected>
Click Here
<OPTION VALUE="http://www.khafankadeh.7p.com/">Webloger Website
<OPTION VALUE="http://www.netscape.com">Netscape
<OPTION VALUE="http://www.microsoft.com">Microsoft
<OPTION VALUE="http://www.infoseek.com">Infoseek
</SELECT><P>
</FORM>
</CENTER>
uody
3rd April 2011, 08:56 PM
کد شماره ی12 کد منوی کشویی لینک که با اسکرول نیز وارد لینک می شود
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- Start Of Drop Down Links Script -->
<!-- Consolidate a bunch of links to a simple drop down menu -->
<!-- Instructions: Just put this in your page where you want to display links. -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.khafankadeh.7p.com -->
<script language="JavaScript">
function CC_go(form) {var myindex=form.dest.selectedIndex
window.open(form.dest.options[myindex].value, target="_parent", "toolbar=yes,scrollbars=yes,location=yes"); }
</script>
<form name="CC_LinkForm">
<select name="dest" SIZE=1>
<option selected value="">Places to go
<option value="http://www.webloger.5u.com/">Webloger Website
<option value="http://home.cnet.com/">CNET
<option value="http://www.tucows.com">Tucows
</select>
<P>
<input type="button" value="Link Me!" onClick="CC_go(this.form)">
</form>
<!-- End Of Drop Down Links Script -->
uody
3rd April 2011, 08:57 PM
کد شماره ی 13 کد منوی کشوی لینک پس از انتخاب و زدن دکمه وارد لینک شود
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- Start Of Drop Down Box Scroll Script -->
<!-- When you make a selection from the list, all the choices scroll -->
<!-- Instructions: Just put this script anywhere on your webpage where you want cool links. -->
<!-- Does not display in IE -->
<center>
<SCRIPT LANGUAGE="JavaScript">
<!--
var sid="mitnamdliw_wildmantim";
function selectaplace(form) {
var appname= navigator.appName;
var appversion=parseInt(navigator.appVersion);
if (appname == "Netscape" && appversion >= 3){
var formindex=form.select1.selectedIndex;
var storage=form.select1.options[formindex].text;
if (form.select1.options[formindex].value != "none") {
var msg=storage+" You are now being teleported to -> "+storage;
for (var spot=0;spot<msg.length-storage.length;spot++) {
var x=msg.substring(spot,msg.length);
form.select1.options[formindex].text=x;
for(var d=0;d<150;d++) { };
}
document.location=form.select1.options[formindex].value;
form.select1[formindex].text=storage;
} else {
form.select1[formindex].text="Not a real option!";
for(var d=0;d<1250;d++) { };
form.select1[formindex].text=storage;
}
}
else {
var formindex=form.select1.selectedIndex;
document.location=form.select1.options[formindex].value;
} }
function makeMyMenu() {
document.write ('<form><select name="select1" onChange="selectaplace(this.form)" size=1>');
document.write ('<option value=http://www.khafankadeh.7p.com>khafan Website');
document.write ('<option value=http://www.andyart.com>Andy Art');
document.write ('<option value=http://www.cnet.com>CNET');
document.write ('<option value=http://www.tucows.com>Tucows');
document.write ('<option value=http://www.winzip.com>WinZIP');
document.write ('</select>');
document.write ('</form>');
}
while(sid!="mitnamdliw_wildmantim"){};
makeMyMenu();
//-->
</SCRIPT>
</center>
<!-- END OF SCRIPT -->
<!/SCRIPT>
uody
3rd April 2011, 08:59 PM
کد شماره ی 14 کد یک منو بسیار زیبا
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- 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.visibi lity='show'
function dropit2(){
if (document.all){
coffeemenu03.style.left=document.body.scrollLeft+e vent.clientX-event.offsetX
coffeemenu03.style.top=document.body.scrollTop+eve nt.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.captur eEvents(Event.CLICK)
document.coffeemenu01.document.coffeemenu02.onclic k=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:2 px 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 -->
uody
3rd April 2011, 09:08 PM
کد شماره ی 15 کد نمایش پیام به صورت افکت
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- START OF Message Reader DHTML -->
<!-- SUMMARY BRIEFS
This DHTML script will cycle through 4 different text links.
You can adjust the text and links below to meet your webpage.
IMPORTANT
Make suer that this body tag is included in your webpage. It
activates the Message Reader.
-->
<body onload="if (document.all||document.layers) {regenerate2();update()}">
<style>
<!--
#msgline{
position:relative;
layer-background-color:black;
width:400;
height:12;
}
#msgtext{
background-color:black;
position:absolute;
border: 1px solid black;
width:400;
height:12;
}
.msgtextfont{
font:bold 16px Arial;
postition:absolute;
left:5px;
text-decoration:none;
color:white;
}
.msgtextfont a{
color:white;
text-decoration:none;
}
-->
</style>
<div id="msgline">
<div id="msgtext" class="msgtextfont">Starting Messages...</div>
</div>
<script language="JavaScript1.2">
var speed=4000
var news=new Array()
news[0]="<a href='http://www.khafankadeh.7p.com'>First line of text....</a>"
news[1]="<a href='http://www.mahmood.7p.com'>Second line of text....</a>"
news[2]="<a href='http://www.andisheh.7p.com'>Third line of text....</a>"
news[3]="<a href='http://www.javakhafan.7p.com'>Add as many as you want....</a>"
i=0
if (document.all)
tickerobject=document.all.msgtext.style
else
tickerobject=document.msgline.document
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers)
setTimeout("window.onresize=regenerate",450)
}
function update(){
BgFade(0xff,0xff,0xff, 0x00,0x00,0x00,10);
if (document.layers){
document.msgline.document.msgtext.document.write('<span class="msgtextfont">'+news[i]+'</span>')
document.msgline.document.msgtext.document.close()
}
else
document.all.msgtext.innerHTML=news[i]
if (i<news.length-1)
i++
else
i=0
setTimeout("update()",speed)
}
function BgFade(red1, grn1, blu1, red2,
grn2, blu2, steps) {
sred = red1; sgrn = grn1; sblu = blu1;
ered = red2; egrn = grn2; eblu = blu2;
inc = steps;
step = 0;
MsgDither();
}
function MsgDither() {
var epct = step/inc;
var spct = 1 - epct;
if (document.layers)
tickerobject.bgColor =
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct);
else
tickerobject.backgroundColor=
Math.floor(sred * spct + ered *
epct)*256*256 +
Math.floor(sgrn * spct + egrn * epct)*256 +
Math.floor(sblu * spct + eblu * epct);
if ( step < inc ) {
setTimeout('MsgDither()',50);
}
step++;
}
</script>
<!-- END OF Message Reader DHTML -->
uody
3rd April 2011, 09:09 PM
کدشماره ی 16 کد به حرکت در آوردن اسکرول لاک از بالا به پایین
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- 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.khafankadeh.7p.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 -->
uody
3rd April 2011, 09:10 PM
کد شماره ی 17 کدنمایش لینک به صورت منویی
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- 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.slideoutConten t.document.slideoutContent1
slideout2 = document.slideoutInterface.document.slideoutConten t.document.slideoutContent2
slideout3 = document.slideoutInterface.document.slideoutConten t.document.slideoutContent3
slideout4 = document.slideoutInterface.document.slideoutConten t.document.slideoutContent4
slideout5 = document.slideoutInterface.document.slideoutConten t.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 -->
uody
3rd April 2011, 09:11 PM
کد شماره ی 18 کد نمایش متن به صورت افکت
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- 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.','khafankade','.7p','.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','#40 8080')
//<!--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 -->
uody
3rd April 2011, 09:12 PM
کد شماره ی 19 کد اضافه کردن صفحه به بوکمارک
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- 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.khafankadeh.7p.com/"
var bookmarktitle="-=[ Webloger Web Site ]=-"
function ccaddbookmark() {
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarkti tle)
}
//-->
</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 -->
uody
3rd April 2011, 09:13 PM
کد شماره ی 20 کد دو خط قرمز بسیار زیبا به دنبال موس
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- START OF Mouse Cursor Crosshairs DHTML -->
<!-- SUMMARY BRIEF
This DHTML script will make a crosshair to follow
your mouse cursor around.
You can change the color of the crosshair by changing
the color hex codes in the <style> tag in the <head>
of your document.
-->
<!-- Put this portion of the script inside of your <HEAD> tag -->
<style>
<!--
#leftright, #topdown{
position: absolute;
left: 0;
top: 0;
width: 1px;
height: 1px;
layer-background-color: #FF0000;
background-color: #FF0000;
z-index: 100;
font-size: 1px;
}
-->
</style>
<!-- Put this code after your <BODY> tag. -->
<div id="leftright" style="width:expression(document.body.clientWidth-2)"></div>
<div id="topdown" style="height:expression(document.body.clientHeight-2)"></div>
<script language="JavaScript1.2">
<!--
if (document.all&&!window.print){
leftright.style.width=document.body.clientWidth-2
topdown.style.height=document.body.clientHeight-2
}
else if (document.layers){
document.leftright.clip.width=window.innerWidth
document.leftright.clip.height=1
document.topdown.clip.width=1
document.topdown.clip.height=window.innerHeight
}
function followmouse1(){
//move cross engine for IE 4+
leftright.style.pixelTop=document.body.scrollTop+e vent.clientY+1
topdown.style.pixelTop=document.body.scrollTop
if (event.clientX<document.body.clientWidth-2)
topdown.style.pixelLeft=document.body.scrollLeft+e vent.clientX+1
else
topdown.style.pixelLeft=document.body.clientWidth-2
}
function followmouse2(e){
//move cross engine for NS 4+
document.leftright.top=e.y+1
document.topdown.top=pageYOffset
document.topdown.left=e.x+1
}
if (document.all)
document.onmousemove=followmouse1
else if (document.layers){
window.captureEvents(Event.MOUSEMOVE)
window.onmousemove=followmouse2
}
function regenerate(){
window.location.reload()
}
function regenerate2(){
setTimeout("window.onresize=regenerate",400)
}
if ((document.all&&!window.print)||document.layers)
//if the user is using IE 4 or NS 4, both NOT IE 5+
window.onload=regenerate2
//-->
</script>
<!-- END OF Mouse Cursor Crosshairs DHTML -->
uody
3rd April 2011, 09:14 PM
کد شماره ی 21 کد اتوماتیک صفحه را ماکزیمم می کند
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- 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.avail Height);
}
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 -->
uody
3rd April 2011, 09:15 PM
کد شماره ی 22 کد پرش به بالای صفحه
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- START OF Watermark Jump to Top Link DHTML -->
<!-- SUMMARY BRIEF
This DHTML script will put a small watermark
link in the bottom right corner of your page
that will stay there even when the page scrolls.
This link will always take the user back to
the top of the page.
-->
<!-- Put this portion of the script inside of your <HEAD> tag -->
<script>
<!--
// Change this text to the text that you want to be displayed as the link on your page.
var displayed="<nobr><font size=2 face=Arial><b>[Top]</b></font></nobr>"
// === DO NOT EDIT ANYTHING BELOW THIS LINE!!! === //
var logolink='javascript:window.scrollTo(0,0)'
var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (ns4)
setTimeout("window.onresize=regenerate",400)
}
if (ie4||ns6)
document.write('<span id="logo" style="position:absolute;top:-300;z-index:100">'+displayed+'</span>')
function createtext(){ //function for NS4
staticimage=new Layer(5)
staticimage.left=-300
staticimage.document.write('<a href="'+logolink+'">'+displayed+'</a>')
staticimage.document.close()
staticimage.visibility="show"
regenerate2()
staticitns()
}
function staticit(){ //function for IE4/ NS6
var w2=ns6? pageXOffset+w : document.body.scrollLeft+w
var h2=ns6? pageYOffset+h : document.body.scrollTop+h
crosslogo.style.left=w2
crosslogo.style.top=h2
}
function staticit2(){ //function for NS4
staticimage.left=pageXOffset+window.innerWidth-staticimage.document.width-28
staticimage.top=pageYOffset+window.innerHeight-staticimage.document.height-10
}
function inserttext(){ //function for IE4/ NS6
if (ie4)
crosslogo=document.all.logo
else if (ns6)
crosslogo=document.getElementById("logo")
crosslogo.innerHTML='<a href="'+logolink+'">'+displayed+'</a>'
w=ns6? window.innerWidth-crosslogo.offsetWidth-20 : document.body.clientWidth-crosslogo.offsetWidth-10
h=ns6? window.innerHeight-crosslogo.offsetHeight-15 : document.body.clientHeight-crosslogo.offsetHeight-10
crosslogo.style.left=w
crosslogo.style.top=h
if (ie4)
window.onscroll=staticit
else if (ns6)
startstatic=setInterval("staticit()",100)
}
if (ie4||ns6){
window.onload=inserttext
window.onresize=new Function("window.location.reload()")
}
else if (ns4)
window.onload=createtext
function staticitns(){ //function for NS4
startstatic=setInterval("staticit2()",90)
}
//-->
</script>
<!-- END OF Watermark Jump to Top Link DHTML -->
uody
3rd April 2011, 09:16 PM
کد شماره ی 23 کد منوی زیبایی که همیشه همراهتان است
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- START OF Watermark Navigation Menu DHTML -->
<!-- SUMMARY BRIEF
This DHTML script will make a navigation menu
that will follow your screen as you scroll,
kind of like the old Geocities™ watermark.
Look through the code for comments that will
tell you where to change the code to configure
it how you want in order to display the links
that you want.
-->
<!-- Put this code inside of your <HEAD> tag. -->
<STYLE TYPE="text/css">
<!--
.menuheader {
BORDER-COLOR : #000000 ;
cursor : hand ;
Border-Left : #000000 ;
Border-Top : #000000 ;
Padding-Left : 1px ;
Padding-Top : 1px ;
Background-Color : #000000 ;
}
.menu {
Background-Color : white ;
}
.home {
cursor : hand ;
}
.menulinks {
text-decoration:none;
}
//-->
</STYLE>
<!-- Put this code inside of your <BODY> tag on your page, but OUTSIDE of any other tags. This can NOT be inside of any other tags on your page. -->
<SCRIPT Language="Javascript1.2">
<!--
///////////////////////////////////////////////////////////////
// Change the width and placement of the menu on the page below.
///////////////////////////////////////////////////////////////
var menuwidth=110
var offsetleft=10
var offsettop=10
var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
function makeStatic() {
if (ie4) {object1.style.pixelTop=document.body.scrollTop+of fsettop}
else if (ns6) {document.getElementById("object1").style.top=window.pageYOffset+offsettop}
else if (ns4) {eval(document.object1.top=eval(window.pageYOffset +offsettop));}
setTimeout("makeStatic()",0);
}
if (ie4||ns6) {document.write('<span ALIGN="CENTER" ID="object1" STYLE="Position:absolute; Top:20; Left:'+offsetleft+'; Z-Index:5;cursor:hand;background-color:black;"><TABLE BORDER="1" width="'+menuwidth+'" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="black" bgcolor="white">')}
else if (ns4){ document.write('<LAYER top="20" name="object1" left="'+offsetleft+'" BGCOLOR=black><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1"><TR><TD><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="'+menuwidth+'">')}
///////////////////////////////////////////////////////////////
// Change the name of the menu (the text at the top) below.
// You can also shange the font face, size and border colors.
///////////////////////////////////////////////////////////////
if (ie4||ns6||ns4)
document.write('<TR><TD BGCOLOR="#3399FF" BORDERCOLORDARK="#99CCFF" BORDERCOLORLIGHT="#003399"><P ALIGN=CENTER><FONT SIZE="4" FACE=ARIAL>Navigation</FONT></TD></TR>')
var menui = new Array();
var menul = new Array();
///////////////////////////////////////////////////////////////
// Edit menus listing here. You can make as many as you need,
// just make sure that the numbers go up in order correctly.
// The "menui" variables are the actual link text that will
// show up in the menu. The "menul" variables are the URLs
// that match the text displayed there.
///////////////////////////////////////////////////////////////
menui[0]="CoffeeCup Software";
menui[1]="CoffeeCup HTML Editor";
menui[2]="CoffeeCup Help Site";
menui[3]="CoffeeCup Site Map";
menui[4]="Other CoffeeCup Products";
menui[5]="Bob & Larry\'s Free Stuff";
menui[6]="About CoffeeCup Software";
menui[7]="Bluedomino Webhosting";
menul[0]="http://www.webloger.5u.com";
menul[1]="http://www.webloger.5u.com";
menul[2]="http://www.webloger.5u.com";
menul[3]="http://www.webloger.5u.com";
menul[4]="http://www.webloger.5u.com";
menul[5]="http://www.webloger.5u.com";
menul[6]="http://www.webloger.5u.com";
menul[7]="http://www.webloger.5u.com";
for (i=0;i<=menui.length-1;i++)
///////////////////////////////////////////////////////////////
// You can change table cell background colors below.
// Just change the color names to whatever you want,
// but do NOT change any other code.
///////////////////////////////////////////////////////////////
if (ie4||ns6) {document.write('<TR><TD BORDERCOLOR="white" ONCLICK="location=\''+menul[i]+'\'" onmouseover="className=\'menuheader\'" onMouseout="className=\'menu\'"><CENTER><FONT>'+menui[i]+'</FONT></TD></TR>')}
else if (ns4){document.write('<TR><TD BGCOLOR="white"><ILAYER><LAYER width="'+menuwidth+'" onmouseover="bgColor=\'yellow\'" onmouseout="bgColor=\'white\'"><CENTER><A HREF="'+menul[i]+'" class=menulinks>'+menui[i]+'</A></CENTER></LAYER></ILAYER></TD></TR>')}
if (ie4||ns6) {document.write('</TABLE></span>')}
else if (ns4){document.write('</TABLE></TD></TR></TABLE></LAYER>')}
function menu3(){
if (ns6||ie4||ns4)
makeStatic()
}
window.onload=menu3
//-->
</SCRIPT>
<!-- END OF Watermark Navigation Menu DHTML -->
uody
3rd April 2011, 09:17 PM
کد شماره ی 24 کد نمایش متن دلخاه به دور موس
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- START OF Mouse Cursor Text Trailer DHTML -->
<!-- SUMMARY BRIEF
This DHTML script will make a text message follow
your cursor around the screen. You can change the
message to say whatever you want.
You can change the font face, color and size in
the .trailersytle tag below. You can change the message
in the javascript below that. Just look for the
comment that says "Insert your personal message below."
-->
<!-- Put this portion of the script inside of your <HEAD> tag -->
<style>
.trailerstyle {
position: absolute;
visibility: visible;
top: -50px;
font-size: 12px;
font-family: Arial,Helvetica,Verdana;
font-weight: bold;
color: #000000;
}
</style>
<script>
<!--
var x,y
var step=20
var flag=0
// Insert your personal message below.
// Important: Do NOT remove the space at the end of the sentence!!!
var message=" www.webloger.5u.com "
message=message.split("")
var xpos=new Array()
for (i=0;i<=message.length-1;i++) {
xpos[i]=-50
}
var ypos=new Array()
for (i=0;i<=message.length-1;i++) {
ypos[i]=-50
}
function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
flag=1
}
function mousetrailer() {
if (flag==1 && document.all) {
for (i=message.length-1; i>=1; i--) {
xpos[i]=xpos[i-1]+step
ypos[i]=ypos[i-1]
}
xpos[0]=x+step
ypos[0]=y
for (i=0; i<message.length-1; i++) {
var thisspan = eval("span"+(i)+".style")
thisspan.posLeft=xpos[i]
thisspan.posTop=ypos[i]
}
}
else if (flag==1 && document.layers) {
for (i=message.length-1; i>=1; i--) {
xpos[i]=xpos[i-1]+step
ypos[i]=ypos[i-1]
}
xpos[0]=x+step
ypos[0]=y
for (i=0; i<message.length-1; i++) {
var thisspan = eval("document.span"+i)
thisspan.left=xpos[i]
thisspan.top=ypos[i]
}
}
var timer=setTimeout("mousetrailer()",30)
}
//-->
</script>
<!-- Put this code inside of your <BODY> tag. -->
<script>
<!--
for (i=0;i<=message.length-1;i++) {
document.write("<span id='span"+i+"' class='trailerstyle'>")
document.write(message[i])
document.write("</span>")
}
if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
//-->
</script>
<!-- Lastly, insert the following into the <BODY> tag, itself, just like the example that follows. -->
example:
<body onLoad="mousetrailer()" style="width:100%;overflow-x:hidden;overflow-y:scroll">
<!-- END OF Mouse Cursor Text Trailer DHTML -->
uody
3rd April 2011, 09:18 PM
کد شماره ی 25 کد تغییر رنگ پشت صفحه
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- Background Changer
Just make sure you add your Title before this script.
If you change the last line in will give you the rest
of the information for your page (link color,text etc.)
Play with the colors !-->
<script>
// Modified by CoffeeCup Software
function initArray()
{
this.length = initArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = initArray.arguments[i]
}
var hexChars = "0123456789ABCDEF";
function Dec2Hex (Dec)
{
var a = Dec % 16;
var b = (Dec - a)/16;
hex = "" + hexChars.charAt(b) + hexChars.charAt(a);
return hex;
}
function bgChanger (begin, end, steps)
{
steps = steps -1 ;
redA = begin.charAt(0) + begin.charAt(1);
red_valA = parseInt(redA,'16');
redB = end.charAt(0) + end.charAt(1);
red_valB = parseInt(redB,'16');
red_int = ((red_valB - red_valA) / steps) * -1;
grnA = begin.charAt(2) + begin.charAt(3);
grn_valA = parseInt(grnA,'16');
grnB = end.charAt(2) + end.charAt(3);
grn_valB = parseInt(grnB,'16');
grn_int = ((grn_valB - grn_valA) / steps) * -1;
bluA = begin.charAt(4) + begin.charAt(5);
blu_valA = parseInt(bluA,'16');
bluB = end.charAt(4) + end.charAt(5);
blu_valB = parseInt(bluB,'16');
blu_int = ((blu_valB - blu_valA) / steps) * -1;
step = 2;
red = red_valA;
grn = grn_valA;
blu = blu_valA;
document.bgColor = begin;
while ( steps >= step )
{
red -= red_int;
red_round = Math.round(red);
red_hex = Dec2Hex(red);
grn -= grn_int;
grn_round = Math.round(grn);
grn_hex = Dec2Hex(grn);
blu -= blu_int;
blu_round = Math.round(blu);
blu_hex = Dec2Hex(blu);
document.bgColor = red_hex + grn_hex + blu_hex;
step++;
}
document.bgColor = end;
}
</script>
</head>
<body bgcolor=#000000 text=#FFFFFF link="FF0000" vlink="8888FF" alink="FF00FF">
<script>
<!--
// black to black (pause)
bgChanger("000000","000000",25);
// black to red
bgChanger("000000","FF0000",25);
// red to black
bgChanger("FF0000","000000",25);
// black to purple
bgChanger("000000","AA00EE",25);
// purple to black
bgChanger("AA00EE","000000",25);
// black to blue
bgChanger("000000","0000FF",25);
// blue to black
bgChanger("0000FF","000000",25);
// black to black (pause)
bgChanger("000000","000000",25);
// -->
</script>
</head>
<body>
<BODY BGCOLOR=000000 text="#ffffff" link="#0000ff" vlink="#c00c0">
<CENTER><H2>khafankade</CENTER></H2>
uody
3rd April 2011, 09:19 PM
کد شماره ی 26 کد ایجاد لینک زیر شاخه ای
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- This script opens a separate window for the locations you give it.
Pages are neat but pictures make a cool photo album. Change the
attributes that read menubar=0,toolbar=0, etc... and Width & Height
to meet your needs. Make sure you place the URL's you want to go
to and their names below.-->
<script language="JavaScript">
<!-- Hide the script from old browsers --
function surfto(form)
{
var myindex=form.dest.selectedIndex
window.open(form.dest.options[myindex].value,"main","menubar=1,toolbar=0,location=0,directories=0,statu s=1,copyhistory=0,width=235,height=235");
}
//-->
</SCRIPT>
<CENTER>
<FORM NAME="myform">
<SELECT NAME="dest" SIZE=1>
<OPTION VALUE="http://www.coffeecup.com">CoffeeCup Software
<OPTION VALUE="http://www.tmcm.com">Too Much Coffee Man
<OPTION VALUE="http://www.netscape.com">Netscape
<OPTION VALUE="http://www.infoseek.com">InfoSeek
</SELECT>
<P>
<INPUT TYPE="BUTTON" VALUE="Go !" onClick="surfto(this.form)">
</FORM>
</CENTER>
uody
3rd April 2011, 09:21 PM
کد شماره ی 27 کد دکمه ای برای خاموش و روشن کردن صفحه
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- DESCRIPTION: This will make your background colors
change upon buttonclick.
INSTRUCTIONS: Place this script in the HEAD tags of
your webpage. Then place the button in your webpage. When
someone clicks it, the webpage background colors will blink.
To change the color of the blinking background, alter the
color-hex tag in the 'function blinkOn' section. This is the
very first section of the JavaScript.
-->
<SCRIPT LANGUAGE="JavaScript">
//Modified by CoffeeCup Software
//This code is Copyright (c) 1997 CoffeeCup Software
//all rights reserved. License is granted to a single user to
//reuse this code on a personal or business Web Site.
function blinkOn(){
theWin.document.bgColor = "#000000"
nTimes++
CCTimeOutID = window.setTimeout("blinkOff()",250);
}
function blinkOff(){
theWin.document.bgColor = "FFFFFF"
if (nTimes < 5)
CCTimeOutID = window.setTimeout("blinkOn()",250);
else theWin.history.go(0)
}
function blinkCC(aWin)
{
nTimes = 0
theWin = aWin
CCTimeOutID = window.setTimeout("blinkOn()",250);
}
</SCRIPT>
<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="On/Off Switch" onClick="blinkCC(self)"></FORM></CENTER>
uody
3rd April 2011, 09:22 PM
کد شماره ی 28 کد نمایش متن به صورت حلقه به دور موس
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<head>
<!-- ************************************************** ************************************************** -->
<!-- BEGIN: PLEASE INSERT THE CODES BETWEEN <HEAD> ... </HEAD> TAGS INTO YOUR OWN PAGE'S <HEAD> SECTION! -->
<SCRIPT LANGUAGE="JavaScript1.2">
var awEMnbSPm;var AWEmnbSPm;var aWEMnbSPm;var AWEMnbSPm;var awemnbsPM;var AwemnbsPM;var aWemnbsPM;var awEmnbsPM;var aweMnbsPM;var AWemnbsPM;var aWEmnbsPM;var awEMnbsPM;AWEmnbsPM("welcome to this site","arial,helvetica,times new roman",2,"#000000",5,1,2,35,5,2,300,300,"DFJO1AC439CXM4FIF5FD94G");var aWEMnbsPM=document.layers;var AWEMnbsPM=document.getElementById&&!document.all;var AwemNBSpm=document.getElementById&&document.all;var awEMnbSPm=awEMnbSPm.split('');var aWemNBSpm=awEMnbSPm.length; var awEmNBSpm=aWEMnbSPm*15;var AWemnBSPm="This script was made by USINGIT.COM (C)2002 All rights reserved. Visit www.usingit.com for more free scripts!";var aWEmnBSPm=0;var awEMnBSPm="<font face="+AWEmnbSPm+" size="+aWEMnbSPm+" color="+AWEMnbSPm+">";if (AwemNBSpm) window.pageYOffset=0;if (AwemNBSpm||AWEMnbsPM||aWEMnbsPM){for (AwemNBSPm=0; AwemNBSPm < aWemNBSpm; AwemNBSPm++)if(AwemNBSpm||AWEMnbsPM){document.writ e('<div id="AwemnBSPM'+AwemNBSPm+'" style="position:absolute;left:0px;top:0px;width:'+awEmNBS pm+'px;height:'+awEmNBSpm+'px;text-align:center;font-weight:regular;cursor:default">'+awEMnBSPm+awEMnbSPm[AwemNBSPm]+'</font></div>');}else if (aWEMnbsPM){document.write('<layer name="AwemnBSPM'+AwemNBSPm+'" left=0 top=0 width='+awEmNBSpm+' height='+awEmNBSpm+'><center>'+awEMnBSPm+awEMnbSPm[AwemNBSPm]+'</font></center></layer>');}}(aWEMnbsPM)?window.captureEvents(Event.MOUSEM OVE):0;(aWEMnbsPM)?window.onMouseMove=aWemNBSPm:do cument.onmousemove=aWemNBSPm;AWemNBSPm=new Array();aWEmNBSPm=new Array();awEMNBSPm=new Array();AWEmNBSPm=new Array();for (AwemNBSPm=0; AwemNBSPm < aWemNBSpm; AwemNBSPm++){AWemNBSPm[AwemNBSPm]=0;aWEmNBSPm[AwemNBSPm]=0;awEMNBSPm[AwemNBSPm]=0;AWEmNBSPm[AwemNBSPm]=0;}if (aWEMnbsPM||AwemNBSpm||AWEMnbsPM)window.onload=awe mnBSPM;function aWemNBSPm(aWEMNBSPm){aWEmnbsPM=(aWEMnbsPM)?aWEMNBS Pm.pageX+20:(AWEMnbsPM)?aWEMNBSPm.pageX-20:event.x-20;awEMnbsPM=(aWEMnbsPM)?aWEMNBSPm.pageY+20-window.pageYOffset:(AWEMnbsPM)?aWEMNBSPm.pageY-window.pageYOffset:event.y;};function AWEMNBSPm(){aWEmnBSPm-=(AwemNBSpm)?AwemnbsPM:(AWEMnbsPM)?awEmnbsPM:(aWEM nbsPM)?aWemnbsPM:0;for (AwemNBSPm=0; AwemNBSPm<aWemNBSpm; AwemNBSPm++){var letter=(AWEMnbsPM||AwemNBSpm)?document.getElementB yId('AwemnBSPM'+AwemNBSPm).style:document.layers['AwemnBSPM'+AwemNBSPm];letter.left=AWemNBSPm[AwemNBSPm]+awEmNBSpm*Math.cos((aWEmnBSPm+AwemNBSPm*1)/3.8)*aweMnbsPM;letter.top=aWEmNBSPm[AwemNBSPm]+awEmNBSpm*Math.sin((aWEmnBSPm+AwemNBSPm*1)/3.8)*AWemnbsPM+window.pageYOffset-15;}};function awemnBSPM(){AWemNBSPm[0]=Math.round(awEMNBSPm[0]+=(aWEmnbsPM-awEMNBSPm[0])*awemnbsPM);aWEmNBSPm[0]=Math.round(AWEmNBSPm[0]+=(awEMnbsPM-AWEmNBSPm[0])*awemnbsPM);for (var AwemNBSPm=1; AwemNBSPm < aWemNBSpm; AwemNBSPm++){AWemNBSPm[AwemNBSPm]=Math.round(awEMNBSPm[AwemNBSPm]+=(AWemNBSPm[AwemNBSPm-1]-awEMNBSPm[AwemNBSPm])*awemnbsPM);aWEmNBSPm[AwemNBSPm]=Math.round(AWEmNBSPm[AwemNBSPm]+=(aWEmNBSPm[AwemNBSPm-1]-AWEmNBSPm[AwemNBSPm])*awemnbsPM);}if(AWemnBSPm.charAt(60)!=String.from CharCode(118))return;if(window.status!=AWemnBSPm)w indow.status=AWemnBSPm;AWEMNBSPm();setTimeout('awe mnBSPM()',10);};function AWEmnbsPM(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12){ awEMnbSPm=p1;AWEmnbSPm=p2;aWEMnbSPm=p3;AWEMnbSPm=p 4;awemnbsPM=p5;awemnbsPM=awemnbsPM/10;AwemnbsPM=p6;aWemnbsPM=p7;awEmnbsPM=p8;AwemnbsP M=AwemnbsPM/10;aWemnbsPM=aWemnbsPM/10;awEmnbsPM=awEmnbsPM/10;aweMnbsPM=p9;AWemnbsPM=p10;aWEmnbsPM=p11;awEMnb sPM=p12;};
</SCRIPT>
<!-- END: PLEASE INSERT THE CODES BETWEEN <HEAD> ... </HEAD> TAGS INTO YOUR OWN PAGE'S <HEAD> SECTION! -->
<!-- ************************************************** ************************************************** -->
</head>
<head>
<!-- ************************************************** ************************************************** -->
<!-- BEGIN: PLEASE INSERT THE CODES BETWEEN <HEAD> ... </HEAD> TAGS INTO YOUR OWN PAGE'S <HEAD> SECTION! -->
<SCRIPT LANGUAGE="JavaScript1.2">
var awEMnbSPm;var AWEmnbSPm;var aWEMnbSPm;var AWEMnbSPm;var awemnbsPM;var AwemnbsPM;var aWemnbsPM;var awEmnbsPM;var aweMnbsPM;var AWemnbsPM;var aWEmnbsPM;var awEMnbsPM;AWEmnbsPM("welcome to this site","arial,helvetica,times new roman",2,"#000000",5,1,2,35,5,2,300,300,"DFJO1AC439CXM4FIF5FD94G");var aWEMnbsPM=document.layers;var AWEMnbsPM=document.getElementById&&!document.all;var AwemNBSpm=document.getElementById&&document.all;var awEMnbSPm=awEMnbSPm.split('');var aWemNBSpm=awEMnbSPm.length; var awEmNBSpm=aWEMnbSPm*15;var AWemnBSPm="This script was made by USINGIT.COM (C)2002 All rights reserved. Visit www.usingit.com for more free scripts!";var aWEmnBSPm=0;var awEMnBSPm="<font face="+AWEmnbSPm+" size="+aWEMnbSPm+" color="+AWEMnbSPm+">";if (AwemNBSpm) window.pageYOffset=0;if (AwemNBSpm||AWEMnbsPM||aWEMnbsPM){for (AwemNBSPm=0; AwemNBSPm < aWemNBSpm; AwemNBSPm++)if(AwemNBSpm||AWEMnbsPM){document.writ e('<div id="AwemnBSPM'+AwemNBSPm+'" style="position:absolute;left:0px;top:0px;width:'+awEmNBS pm+'px;height:'+awEmNBSpm+'px;text-align:center;font-weight:regular;cursor:default">'+awEMnBSPm+awEMnbSPm[AwemNBSPm]+'</font></div>');}else if (aWEMnbsPM){document.write('<layer name="AwemnBSPM'+AwemNBSPm+'" left=0 top=0 width='+awEmNBSpm+' height='+awEmNBSpm+'><center>'+awEMnBSPm+awEMnbSPm[AwemNBSPm]+'</font></center></layer>');}}(aWEMnbsPM)?window.captureEvents(Event.MOUSEM OVE):0;(aWEMnbsPM)?window.onMouseMove=aWemNBSPm:do cument.onmousemove=aWemNBSPm;AWemNBSPm=new Array();aWEmNBSPm=new Array();awEMNBSPm=new Array();AWEmNBSPm=new Array();for (AwemNBSPm=0; AwemNBSPm < aWemNBSpm; AwemNBSPm++){AWemNBSPm[AwemNBSPm]=0;aWEmNBSPm[AwemNBSPm]=0;awEMNBSPm[AwemNBSPm]=0;AWEmNBSPm[AwemNBSPm]=0;}if (aWEMnbsPM||AwemNBSpm||AWEMnbsPM)window.onload=awe mnBSPM;function aWemNBSPm(aWEMNBSPm){aWEmnbsPM=(aWEMnbsPM)?aWEMNBS Pm.pageX+20:(AWEMnbsPM)?aWEMNBSPm.pageX-20:event.x-20;awEMnbsPM=(aWEMnbsPM)?aWEMNBSPm.pageY+20-window.pageYOffset:(AWEMnbsPM)?aWEMNBSPm.pageY-window.pageYOffset:event.y;};function AWEMNBSPm(){aWEmnBSPm-=(AwemNBSpm)?AwemnbsPM:(AWEMnbsPM)?awEmnbsPM:(aWEM nbsPM)?aWemnbsPM:0;for (AwemNBSPm=0; AwemNBSPm<aWemNBSpm; AwemNBSPm++){var letter=(AWEMnbsPM||AwemNBSpm)?document.getElementB yId('AwemnBSPM'+AwemNBSPm).style:document.layers['AwemnBSPM'+AwemNBSPm];letter.left=AWemNBSPm[AwemNBSPm]+awEmNBSpm*Math.cos((aWEmnBSPm+AwemNBSPm*1)/3.8)*aweMnbsPM;letter.top=aWEmNBSPm[AwemNBSPm]+awEmNBSpm*Math.sin((aWEmnBSPm+AwemNBSPm*1)/3.8)*AWemnbsPM+window.pageYOffset-15;}};function awemnBSPM(){AWemNBSPm[0]=Math.round(awEMNBSPm[0]+=(aWEmnbsPM-awEMNBSPm[0])*awemnbsPM);aWEmNBSPm[0]=Math.round(AWEmNBSPm[0]+=(awEMnbsPM-AWEmNBSPm[0])*awemnbsPM);for (var AwemNBSPm=1; AwemNBSPm < aWemNBSpm; AwemNBSPm++){AWemNBSPm[AwemNBSPm]=Math.round(awEMNBSPm[AwemNBSPm]+=(AWemNBSPm[AwemNBSPm-1]-awEMNBSPm[AwemNBSPm])*awemnbsPM);aWEmNBSPm[AwemNBSPm]=Math.round(AWEmNBSPm[AwemNBSPm]+=(aWEmNBSPm[AwemNBSPm-1]-AWEmNBSPm[AwemNBSPm])*awemnbsPM);}if(AWemnBSPm.charAt(60)!=String.from CharCode(118))return;if(window.status!=AWemnBSPm)w indow.status=AWemnBSPm;AWEMNBSPm();setTimeout('awe mnBSPM()',10);};function AWEmnbsPM(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12){ awEMnbSPm=p1;AWEmnbSPm=p2;aWEMnbSPm=p3;AWEMnbSPm=p 4;awemnbsPM=p5;awemnbsPM=awemnbsPM/10;AwemnbsPM=p6;aWemnbsPM=p7;awEmnbsPM=p8;AwemnbsP M=AwemnbsPM/10;aWemnbsPM=aWemnbsPM/10;awEmnbsPM=awEmnbsPM/10;aweMnbsPM=p9;AWemnbsPM=p10;aWEmnbsPM=p11;awEMnb sPM=p12;};
</SCRIPT>
<!-- END: PLEASE INSERT THE CODES BETWEEN <HEAD> ... </HEAD> TAGS INTO YOUR OWN PAGE'S <HEAD> SECTION! -->
<!-- ************************************************** ************************************************** -->
</head>
uody
3rd April 2011, 09:24 PM
کد شماره ی 29 کد آمدن پیغام مورد نظر شما هنگام ورود افراد به سایت شما
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'><html>
<head>
<script language="javascript" type="text/javascript">
alert("Welcome to my site")
</script>
</head>
<body>
<h1>
<!-- hide script from old browsers -->
<!--this is on example of a long JavaScript comment-->
<script language="javascript" type="text/javascript">
document.write("KKR")
//end hiding script from old browsers -->
</script>
</h1>
</body>
</html>
uody
3rd April 2011, 09:25 PM
کد شماره ی 30 کد رنگی کردن اسکرول بار
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<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>
uody
3rd April 2011, 09:26 PM
کد شماره ی 31 کد گذاشتن جستجو در سایت یا وبلاگ
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<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("(( ببخشيد... كلمه اي كه نوشتي تو وبلاگ نيست)) ");
}
}
return false;
}
</SCRIPT>
<FORM name=search onsubmit="return findInPage(this.string.value);">
<P align=center><FONT size=3><INPUT
style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid"
onchange="n = 0;" size=11 name=string></FONT><BR><INPUT style="BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #ffffff 1px solid; BORDER-BOTTOM: #ffffff 1px solid; FONT-FAMILY: Tahoma; BACKGROUND-COLOR: #aaaaaa" type=submit value=جستجو در وبلاگ ><center><font size=2pt;><font family=Times New Roman;><b><A title=persianblog href="http://www.Javascripts.persianblog.com/">Javascripts
</A><BR>
</P></FORM></DIV><BR><!-- /Search-->
uody
3rd April 2011, 09:26 PM
کد شماره ی 32 کد ستاره باران در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- 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','#ff a500','#ffff00','#00ff00','#ffffff','#ff00ff')
CL2=new Array('#ffa500','#00ff00','#FFAAFF','#fff000','#ff fffF')
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;widt h: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:2p x;background:'+I+';font-size:2px"></div>');
document.write('</div></div>');
}
function Fireworks(){
H=(NS4||NS6)?window.innerHeight:window.document.bo dy.clientHeight;
W=(NS4||NS6)?window.innerWidth:window.document.bod y.clientWidth;
Y=(NS4||NS6)?window.pageYOffset:window.document.bo dy.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.wi dth=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 -->
uody
3rd April 2011, 09:27 PM
کد شماره ی 33 کد برف باران در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- Web Site: http://www.khafankadeh.7p.com-->
<!-- javakhafan.9f.com -->
<script>
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35
// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")
// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")
// Set the letter that creates your snowflake (recommended:*)
var snowletter="*"
// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6
// Set the maximal-size of your snowflaxes
var snowmaxsize=22
// Set the minimal-size of your snowflaxes
var snowminsize=8
// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=3
///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////
// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5||ns6||opera
function randommaker(range) {
rand=Math.floor(range*Math.random())
return rand
}
function initsnow() {
if (ie5 || opera) {
marginbottom = document.body.clientHeight
marginright = document.body.clientWidth
}
else if (ns6) {
marginbottom = window.innerHeight
marginright = window.innerWidth
}
var snowsizerange=snowmaxsize-snowminsize
for (i=0;i<=snowmax;i++) {
crds[i] = 0;
lftrght[i] = Math.random()*15;
x_mv[i] = 0.03 + Math.random()/10;
snow[i]=document.getElementById("s"+i)
snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
snow[i].size=randommaker(snowsizerange)+snowminsize
snow[i].style.fontSize=snow[i].size
snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
snow[i].sink=sinkspeed*snow[i].size/5
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
snow[i].style.left=snow[i].posx
snow[i].style.top=snow[i].posy
}
movesnow()
}
function movesnow() {
for (i=0;i<=snowmax;i++) {
crds[i] += x_mv[i];
snow[i].posy+=snow[i].sink
snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i]);
snow[i].style.top=snow[i].posy
if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
snow[i].posy=0
}
}
var timer=setTimeout("movesnow()",50)
}
for (i=0;i<=snowmax;i++) {
document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
window.onload=initsnow
}
</script>
uody
3rd April 2011, 09:28 PM
کد شماره ی 34 کد گلباران در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<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.docu ment.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.docu ment.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>
uody
3rd April 2011, 09:29 PM
کد شماره ی 35 کد جستوجو گر گوگل در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- 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 -->
uody
4th April 2011, 12:43 AM
کد شماره ی 36 کد جستجوگر ام اس ان در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<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>
uody
4th April 2011, 12:44 AM
کد شماره ی 37 کد خروج از صفحه
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- Start of Close Browser Script -->
<!-- When the "Close Window" button is clicked, this script
will close the browser window that the webpage is in.
-->
<script language="JavaScript">
<!--
function closeIt() {
close();
}
// -->
</script>
<center>
<form>
<input type=button value="Close Window" onClick="closeIt()">
</form>
</center>
<!-- End of Close Browser Script -->
uody
4th April 2011, 12:45 AM
کد شماره ی 38 کد ساعت عقربه دار
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
</SCRIPT>
<SCRIPT language=JavaScript>
fCol='444444'; //face colour.
sCol='FF0000'; //seconds colour.
mCol='444444'; //minutes colour.
hCol='444444'; //hours colour.
Ybase=30; //Clock height.
Xbase=30; //Clock width.
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
NS4=(document.layers);
NS6=(document.getElementById&&!document.all);
IE4=(document.all);
Ypos=0;
Xpos=0;
dots=12;
Split=360/dots;
if (NS6){
for (i=1; i < dots+1; i++){
document.write('<div id="n6Digits'+i+'" style="position:absolute;top:0px;left:0px;width:30px;heig ht:30px;font-family:Arial;font-size:10px;color:#'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
for (i=0; i < M.length; i++){
document.write('<div id="Ny'+i+'" style="position:absolute;top:0px;left:0px;width:2px;heigh t:2px;font-size:2px;background:#'+mCol+'"></div>');
}
for (i=0; i < H.length; i++){
document.write('<div id="Nz'+i+'" style="position:absolute;top:0px;left:0px;width:2px;heigh t:2px;font-size:2px;background:#'+hCol+'"></div>');
}
for (i=0; i < S.length; i++){
document.write('<div id="Nx'+i+'" style="position:absolute;top:0px;left:0px;width:2px;heigh t:2px;font-size:2px;background:#'+sCol+'"></div>');
}
}
if (NS4){
dgts='1 2 3 4 5 6 7 8 9 10 11 12';
dgts=dgts.split(' ')
for (i=0; i < dots; i++){
document.write('<layer name=nsDigits'+i+' top=0 left=0 height=30 width=30><center><font face=Arial size=1 color='+fCol+'>'+dgts[i]+'</font></center></layer>');
}
for (i=0; i < M.length; i++){
document.write('<layer name=ny'+i+' top=0 left=0 bgcolor='+mCol+' clip="0,0,2,2"></layer>');
}
for (i=0; i < H.length; i++){
document.write('<layer name=nz'+i+' top=0 left=0 bgcolor='+hCol+' clip="0,0,2,2"></layer>');
}
for (i=0; i < S.length; i++){
document.write('<layer name=nx'+i+' top=0 left=0 bgcolor='+sCol+' clip="0,0,2,2"></layer>');
}
}
if (IE4){
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=1; i < dots+1; i++){
document.write('<div id="ieDigits" style="position:absolute;top:0px;left:0px;width:30px;heig ht:30px;font-family:Arial;font-size:10px;color:'+fCol+';text-align:center;padding-top:10px">'+i+'</div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++){
document.write('<div id=y style="position:absolute;width:2px;height:2px;font-size:2px;background:'+mCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++){
document.write('<div id=z style="position:absolute;width:2px;height:2px;font-size:2px;background:'+hCol+'"></div>');
}
document.write('</div></div>')
document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++){
document.write('<div id=x style="position:absolute;width:2px;height:2px;font-size:2px;background:'+sCol+'"></div>');
}
document.write('</div></div>')
}
function clock(){
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.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;
if (NS6){
Ypos=window.pageYOffset+window.innerHeight-Ybase-25;
Xpos=window.pageXOffset+window.innerWidth-Xbase-30;
for (i=1; i < dots+1; i++){
document.getElementById("n6Digits"+i).style.top=Ypos-15+Ybase*Math.sin(-1.56 +i *Split*Math.PI/180)
document.getElementById("n6Digits"+i).style.left=Xpos-15+Xbase*Math.cos(-1.56 +i*Split*Math.PI/180)
}
for (i=0; i < S.length; i++){
document.getElementById("Nx"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(sec);
document.getElementById("Nx"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(sec);
}
for (i=0; i < M.length; i++){
document.getElementById("Ny"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(min);
document.getElementById("Ny"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(min);
}
for (i=0; i < H.length; i++){
document.getElementById("Nz"+i).style.top=Ypos+i*Ybase/4.1*Math.sin(hrs);
document.getElementById("Nz"+i).style.left=Xpos+i*Xbase/4.1*Math.cos(hrs);
}
}
if (NS4){
Ypos=window.pageYOffset+window.innerHeight-Ybase-20;
Xpos=window.pageXOffset+window.innerWidth-Xbase-30;
for (i=0; i < dots; ++i){
document.layers["nsDigits"+i].top=Ypos-5+Ybase*Math.sin(-1.045 +i*Split*Math.PI/180)
document.layers["nsDigits"+i].left=Xpos-15+Xbase*Math.cos(-1.045 +i*Split*Math.PI/180)
}
for (i=0; i < S.length; i++){
document.layers["nx"+i].top=Ypos+i*Ybase/4.1*Math.sin(sec);
document.layers["nx"+i].left=Xpos+i*Xbase/4.1*Math.cos(sec);
}
for (i=0; i < M.length; i++){
document.layers["ny"+i].top=Ypos+i*Ybase/4.1*Math.sin(min);
document.layers["ny"+i].left=Xpos+i*Xbase/4.1*Math.cos(min);
}
for (i=0; i < H.length; i++){
document.layers["nz"+i].top=Ypos+i*Ybase/4.1*Math.sin(hrs);
document.layers["nz"+i].left=Xpos+i*Xbase/4.1*Math.cos(hrs);
}
}
if (IE4){
Ypos=document.body.scrollTop+window.document.body. clientHeight-Ybase-20;
Xpos=document.body.scrollLeft+window.document.body .clientWidth-Xbase-20;
for (i=0; i < dots; ++i){
ieDigits[i].style.pixelTop=Ypos-15+Ybase*Math.sin(-1.045 +i *Split*Math.PI/180)
ieDigits[i].style.pixelLeft=Xpos-15+Xbase*Math.cos(-1.045 +i *Split*Math.PI/180)
}
for (i=0; i < S.length; i++){
x[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(sec);
x[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(sec);
}
for (i=0; i < M.length; i++){
y[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(min);
y[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(min);
}
for (i=0; i < H.length; i++){
z[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(hrs);
z[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(hrs);
}
}
setTimeout('clock()',100);
}
clock();
//-->
</SCRIPT>
<SCRIPT language=JavaScript>
fCol='444444'; //face colour.
sCol='FF0000'; //seconds colour.
mCol='444444'; //minutes colour.
hCol='444444'; //hours colour.
Ybase=30; //Clock height.
Xbase=30; //Clock width.
</body>
</html>
<p align="center"><a href="http://www.kafankadeh.7p.com">
<font face="Tahoma" size="2">webloger site</font></a></p>
uody
4th April 2011, 12:46 AM
کد شماره ی 39 کد دکمه ی عقب و جلو در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- Start of Back/Forward Buttons Script-->
<!-- Instructions: Just put this script anywhere on your webpage
and you will give your visitor 2 Back and Forward Navigation
buttons. Designed for websites that have multiple webpages.
-->
<SCRIPT LANGUAGE="JavaScript">
<!-- hide this script tag's contents from old browsers
function goHist(a)
{
history.go(a); // Go back one.
}
//<!-- done hiding from old browsers -->
</script>
<FORM METHOD="post">
<INPUT TYPE="button" VALUE=" BACK " onClick="goHist(-1)">
<INPUT TYPE="button" VALUE="FORWARD" onClick="goHist(1)">
</form>
<!-- End of Back/Forward Buttons Script -->
uody
4th April 2011, 12:47 AM
کد شماره ی 40 کد برای پرینت از صفحه
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- 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>
uody
4th April 2011, 12:48 AM
کد شماره ی 41 کد حرکت جستجو گر به صورت جالب
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- Start of Browser Shake JavaScript -->
<!-- This script causes your entire browser window to shake. ::rumble:: -->
<!-- Instructions: Just put the beginning of this code inside your pages
'<head>' tags and the later part inside your pages '<body>' tags. -->
<!-- Script supplied with CoffeeCup HTML Editor -->
<!-- www.coffeecup.com -->
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<script>
function drop(n) {
if(self.moveBy){
self.moveBy (0,-900);
for(i = n; i > 0; i--){
self.moveBy(0,3);
}
for(j = 8; j > 0; j--){
self.moveBy(0,j);
self.moveBy(j,0);
self.moveBy(0,-j);
self.moveBy(-j,0);
}
}
}
</script>
<SCRIPT language="JavaScript">
<!--
var TrackRed= 0x00; //(RED) Replace the values after '0x' with the
var TrackGreen= 0x00; //(GREEN) two-letter/number hexadecimal color codes
var TrackBlue= 0x00; //(BLUE) in the BODY tag (after bgcolor=).
function FadeTo(steps,red,green,blue)
{
for (var i = 0; i <= steps; i++)
{
var endpart = i/steps;
var startpart = 1 - endpart;
document.bgColor =
Math.floor(TrackRed * startpart + red * endpart)*256*256 +
Math.floor(TrackGreen * startpart + green * endpart)*256 +
Math.floor(TrackBlue * startpart + blue * endpart);
}
TrackRed=red; TrackGreen=green; TrackBlue=blue;
}
//-->
</SCRIPT>
<STYLE TYPE="text/css">
<!--
A {text-decoration:none;}
A:hover {color:silver;}
//-->
</STYLE>
</head>
<body bgcolor="black" text="silver" link="silver"
vlink="silver" alink="silver" onload="drop(300); FadeTo(50,0xFF,0xFF,0xFF);">
<p align="center"><b><font face="Tahoma" size="2">Created By
<a href="http://www.khafankadeh.7p.com/">Webloger.5u.com</a></font></b></p>
</body>
</html>
<!-- End of Browser Shake JavaScript -->
uody
4th April 2011, 12:52 AM
کد شماره ی 42 کد ویزیتور برای سایت
برای استفاده از این کد باید به سایت های زیر بروید و کد را گرفته ودر سایت خود بگذارید
www.bravetools.com
www.freelogs.com
www.webgozar.com
uody
4th April 2011, 12:53 AM
کد شماره ی 43 کد مدت زمانی که شخص وارد سایت یا وبلاگ شده است
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- 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 -->
uody
4th April 2011, 12:54 AM
کد شماره ی 44 کد دریافت نام کاربر و رنگ مورد علاقه او و خوش آمد گویی به او با همان رنگ
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- 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 -->
uody
4th April 2011, 12:55 AM
کد شماره ی 45 کد ساعت دیجیتال (کامپیوتری) در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<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>
uody
4th April 2011, 12:56 AM
کد شماره ی 46کد تاریخ میلادی در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- 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 طراحی وبلاگ-->
uody
4th April 2011, 12:57 AM
کد شماره ی 47 کد دکمه ذخیره صفحه سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<script>
// CREDITS:
// khafankadeh
// 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.khafankadeh.7p.com
// IMPORTANT:
// If you add this script to a script-library or a script-archive
// you have to insert a link to http://www.khafankadeh.7p.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>
uody
4th April 2011, 12:58 AM
کد شماره ی 48 کد از بین بردن آندر لاین زیر لینکها
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- 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 -->
uody
4th April 2011, 01:00 AM
کد شماره ی 49 کد نمایش متن در استاتوس بار با رفتن بر روی تصویر
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- 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>
uody
4th April 2011, 01:01 AM
کد شماره ی 50 کد رقص متن در استاتوس بار 1
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- 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()">
uody
4th April 2011, 01:02 AM
کد شماره ی 52کد رقص متن در استاتوس بار 3
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- Start of Status Blinker -->
<!-- This will put a blinking status bar message in your webpage.
Important: There are two parts to this script, one goes
in between the HEAD tags and one goes in the BODY tag.
-->
<script>
var yourwords = "khafankadeh.7p.com";
var speed = 300;
var control = 1;
function flash()
{
if (control == 1)
{
window.status=yourwords;
control=0;
}
else
{
window.status="";
control=1;
}
setTimeout("flash()",speed);
}
</script>
<!--You can control the speed of the flashing in this script. You just need to change the speed number 300. Bigger the number the slower it goes.-->
<!-- From this part on up goes in between the HEAD tags -->
<body onLoad="flash()">
<!-- End of Status Blinker -->
uody
4th April 2011, 01:03 AM
کد شماره ی 53کد لرزش موقت در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- START CODE Powered javascript code by WWW.khafankadeh.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.khafankadeh.7p.COM-->
uody
4th April 2011, 01:08 AM
کد شماره ی 54کد باز شئن صفحه ای جدید
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<p><!--webbot bot="HTMLMarkup" startspan --><form name="redirect">
<center>
<font face="Arial"><b>You will be redirected to the script in<br><br>
<form>
<input type="text" size="3" name="redirect2">
</form>
seconds</b></font>
</center>
<script>
<!--
var targetURL="http://www.javakhafan.7p.com"
var countdownfrom=5
var currentsecond=document.redirect.redirect2.value=co untdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
document.redirect.redirect2.value=currentsecond
}
else{
window.location=targetURL
return
}
setTimeout("countredirect()",1000)
}
countredirect()
//-->
</script>
<!--webbot bot="HTMLMarkup" endspan --></p>
</body>
</html></body>
</html>
uody
4th April 2011, 01:09 AM
کد شماره ی 55کد تغییر رنگ به صورت تصادفی
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
http://www.khafankadeh.7p.com
<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(startCo lorstr="+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>
uody
4th April 2011, 01:12 AM
کد شماره ی 56کد برای باز کردن فایل
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- TWO STEPS TO INSTALL FILE OPEN:
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">
<!-- Begin
// Thank you Larry McClurg for the cross-browser fix
function whatFile() {
window.location= 'file:///' + document.form1.cmuds.value;
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<form name=form1>
<input type=file name="cmuds">
<input type=button onClick="whatFile()" value="Open File">
</form>
<p><center>
<font face="arial, helvetica" size"-2"><br>
<!-- Script Size: 1.09 KB -->
</font></center>
uody
4th April 2011, 01:13 AM
کد شماره ی 57 کد داشتن دکمه ای ثابت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- ONE STEP TO INSTALL ALERT BUTTON:
1. Paste the coding into the BODY of the HTML document -->
<!-- STEP ONE: Copy this code into the BODY of your HTML document -->
<BODY>
<CENTER>
<FORM>
<! >
<! >
<INPUT TYPE="button" VALUE="Click here to be alerted"
onClick='alert("There. You have been alerted.")'>
</FORM>
</CENTER>
<!-- Script Size: 0.50 KB -->
uody
4th April 2011, 01:14 AM
کد شماره ی 58کد دکمه ای برای میل زدن
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- ONE STEP TO INSTALL E-MAIL BUTTON:
1. Paste the coding into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the BODY of your HTML document -->
<BODY>
<! >
<! >
<FORM>
<INPUT TYPE="button" VALUE="Click Here to Write to Me" onClick="parent.location='mailto:antispammer@earthling.net'">
</FORM>
<FORM>
<INPUT TYPE="button" VALUE="Click Here to Write to Me - Subject Predetermined" onClick="parent.location='mailto:spammer@earthling.net?subj ect=This Is The Pre-determined Subject'">
</FORM>
<!-- Script Size: 0.70 KB -->
uody
4th April 2011, 01:14 AM
کد شماره ی 60 کد گذاشتن موزیک در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<EMBED SRC='ادرس وب اهنگ در اینجا' WIDTH=120 HEIGHT=26 LOOP=true type=audio/x-pn-realaudio-plugin></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top align=left width=4
</body>
</html>
uody
4th April 2011, 01:23 AM
کد شماره ی 61 کد افکت به متن به صورت زیبا
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<h2>
<p align="center">
<script language="JavaScript1.2">
/*
Neon Lights Text
By JavaScript Kit (www.khafankadeh.7p.com)
Over 400+ free scripts here!
*/
var message="be site man khosh omadid mahmoodbina"
var neonbasecolor="gray"
var neontextcolor="#ff0000"
var flashspeed=100 //in milliseconds
///No need to edit below this line/////
var n=0
if (document.all){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight">'+message.charAt(m)+'</span>')
document.write('</font>')
//cache reference to neonlight array
var tempref=document.all.neonlight
}
else
document.write(message)
function neon(){
//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
tempref[m].style.color=neonbasecolor
}
//cycle through and change individual letters to neon color
tempref[n].style.color=neontextcolor
if (n<tempref.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}
function beginneon(){
if (document.all)
flashing=setInterval("neon()",flashspeed)
}
beginneon()
</script>
</h2>
uody
4th April 2011, 01:25 AM
کد شماره ی 62 کد قفل کردن راست کلیک
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<SCRIPT language=javascript>
function noRightClick() {
if (event.button==2) {
alert('مگه از نش من رد بشي !!!!')
}
}
document.onmousedown=noRightClick
</SCRIPT>
uody
4th April 2011, 01:27 AM
کد شماره ی 63کد برای لینک دادن
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<a target="_blank" href="www.khafankadeh.7p.com"> <font face="Titr">mahmood bina</font></a>
uody
4th April 2011, 01:39 AM
کد شماره ی 64 کد پروانه در سایت
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<script>
<!-- Begin
var no = 2; // snow number
var speed = 6; // smaller number moves the snow faster
var snowflake = "http://www.forever-memories.net/Animated%20gifs/bfa.gif";
var ns4up = (document.layers) ? 1 : 0; // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ns4up) { // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
}
} else if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
}
}
}
function snowNS() { // Netscape main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", speed);
}
function snowIE() { // IE main animation function
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
// End -->
</script>
uody
4th April 2011, 02:22 AM
کد شماره ی 65 کد بازی با موس
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- TWO STEPS TO INSTALL BALL DROP:
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="JavaScript1.2">
<!-- Original: Dragos Saracu (smardoi@yahoo.com) -->
<!-- Cross Browser by: Bob Simpson (webmaster@maryjanebrown.net) -->
<!-- Contributor URL: http://www.maryjanebrown.net/webmaster -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function BrowserCheck() {
var b = navigator.appName;
if (b == "Netscape") this.b = "NS";
else if (b == "Microsoft Internet Explorer") this.b = "IE";
else this.b = b;
this.v = parseInt(navigator.appVersion);
this.NS = (this.b == "NS" && this.v>=4);
this.NS4 = (this.b == "NS" && this.v == 4);
this.NS5 = (this.b == "NS" && this.v == 5);
this.IE = (this.b == "IE" && this.v>=4);
this.IE4 = (navigator.userAgent.indexOf('MSIE 4')>0);
this.IE5 = (navigator.userAgent.indexOf('MSIE 5')>0);
if (this.IE5 || this.NS5) this.VER5 = true;
if (this.IE4 || this.NS4) this.VER4 = true;
this.OLD = (! this.VER5 && ! this.VER4) ? true : false;
this.min = (this.NS||this.IE);
}
is = new BrowserCheck();
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<center>
<br>
<div id="staticBall" style="position:relative;visibility:visible">
<img src="http://javascript.internet.com/img/ball-drop/ball.gif" height=30 width=30 alt="Static ball">
</div>
</center>
<div id="ball" style="visibility:hidden; position:absolute; left:100; top:10; height:34; width:34">
<img src="http://javascript.internet.com/img/ball-drop/ball.gif" height=30 width=30 alt="Bouncing ball">
</div>
<script language="Javascript1.2">
<!-- Begin
iter = 0;
setId = 0;
down = true;
up = false;
bouncingBall = (is.VER5) ? document.getElementById("ball").style
: (is.NS) ? document.layers["ball"]
: document.all["ball"].style;
stillBall = (is.VER5) ? document.getElementById("staticBall").style
: (is.NS) ? document.layers["staticBall"] : document.all["staticBall"].style;
winH = (is.NS) ? window.innerHeight - 55 : document.body.offsetHeight - 55;
document.onmouseup = buttonUp;
if (is.NS4)
document.captureEvents(Event.MOUSEUP);
function buttonUp(e) {
if ( ((is.NS) ? e.which : event.button) != 1) return true;
if (setId != 0) clearInterval(setId);
bouncingBall.visibility="visible";
stillBall.visibility="hidden";
bouncingBall.left = (is.NS) ? e.pageX - 15 : event.offsetX - 15;
bouncingBall.top = (is.NS) ? e.pageY - 15 : event.offsetY - 15;
iter = 0;
setId = setInterval("generateGravity()", 20);
return true;
}
function generateGravity() {
if ((parseInt(bouncingBall.top)+iter < winH) && down) {
bouncingBall.top = parseInt(bouncingBall.top) + iter;
iter++;
return;
}
else {
if ((parseInt(bouncingBall.top)< winH) && down) {
bouncingBall.top = winH + 5;
return;
}
down = false;
up = true;
if (iter < 0 && parseInt(bouncingBall.top) > winH) {
clearInterval(setId);
bouncingBall.visibility = "hidden";
stillBall.visibility="visible";
setId = 0;
}
if (parseInt(bouncingBall.top) > 0 && up && iter >= 0) {
bouncingBall.top = parseInt(bouncingBall.top) - iter;
iter--;
if (iter%3 == 0) iter--;
return;
}
down = true;
up = false;
}
}
// End -->
</script>
<p><center>
</center><p>
<!-- Script Size: 3.46 KB -->
uody
4th April 2011, 02:24 AM
کد شماره ی 66 کد ستاره باران در سایت
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- TWO STEPS TO INSTALL FIREWORKS 2:
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>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Jacco IJzerman (j.ijzerman1@chello.nl ) -->
<!-- Web Site: http://variomatic.quickhost.nl -->
<!--[if IE ]>
<style type="text/css">
body { overflow: hidden; }
v\:* { behavior: url(#default#VML); }
</style>
<![endif]-->
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Jacco IJzerman (j.ijzerman1@chello.nl ) -->
<!-- Web Site: http://variomatic.quickhost.nl -->
<!--[if IE ]>
<script language="JavaScript">
colors = new Array();
// Define your own color combinations
colors[0] = new Array('yellow', 'lime');
colors[1] = new Array('silver', 'green')
colors[2] = new Array('silver', 'blue');
colors[3] = new Array('silver', 'purple');
colors[4] = new Array('purple', 'white');
colors[5] = new Array('blue', 'silver');
colors[6] = new Array('red', 'fuchsia');
colors[7] = new Array('yellow', 'red');
// Define the maximum number of fire arrows
maximum = 1000;
vmlobj='';
for(i = 0; i < 12; i++){
vmlobj += '<div id="ster'+i+'" style="position:absolute; left:-50px; top-50px; visibility:hidden; z-index:50;">';
vmlobj += '<v:shape style="width:15px; height:15px;" fillcolor="yellow" coordorigin="0,0" coordsize="200 200">';
vmlobj += '<v:path v="m 8,65 l 72,65, 92,11, 112,65, 174,65, 122,100, 142,155,92,121, 42,155, 60,100 x e"/>';
vmlobj += '<v:stroke on="false" /></v:shape></div>';
}
document.write(vmlobj); vmlobj = null;
aantal = 0;
function begin()
{
try {
if(aantal == maximum){ return;}
kleurschema = Math.floor(Math.random() * colors.length);
posLinks = Math.floor(Math.random() * (document.body.clientWidth - 180));
posLinks = (posLinks < 170)? 170: posLinks;
posBoven = Math.floor(Math.random() * (document.body.clientHeight - 180));
posBoven = (posBoven < 170)? 170: posBoven;
straal = 0; uiteen = true; teller = 1; flikkereffect = false;
for(var i = 0; i < 12; i++){
document.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][0]);
document.getElementById('ster'+i).style.visibility = 'hidden'; // 5.0 fix
document.getElementById('ster'+i).style.left = posLinks;
document.getElementById('ster'+i).style.top = posBoven;
}
document.getElementById('ster0').style.top = (document.body.clientHeight - 20);
document.getElementById('ster0').style.visibility = 'visible';
omhoog();
} catch(e){}
}
function omhoog()
{
try {
positie = parseInt(document.getElementById('ster0').style.to p);
if(positie > posBoven){
document.getElementById('ster0').style.top = (positie - 25);
setTimeout('omhoog()', 50);
} else {
for(i = 1; i < 12; i++){
document.getElementById('ster'+i).style.top = positie;
document.getElementById('ster'+i).style.visibility = 'visible';
}
uiteenspatten();
}
} catch(e){}
}
function uiteenspatten()
{
try {
if(straal > 120 && straal % 10 == 0){
flikkereffect = true;
teller = (teller == colors[kleurschema].length)? 0: (teller+1);
}
for(var i = 0; i < 12; i++){
var hoek = i * 30;
var piHoek = Math.PI - Math.PI / 180 * hoek;
var links = posLinks + Math.round(straal * Math.sin(piHoek));
var boven = positie + Math.round(straal * Math.cos(piHoek));
document.getElementById('ster'+i).style.left = links;
document.getElementById('ster'+i).style.top = boven;
if(flikkereffect){
document.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][teller]);
}
}
if(straal < 160 && uiteen){
straal += (straal < 120)? 10: 5;
setTimeout('uiteenspatten()', 50);
}
else if(straal > 120){
uiteen = false; straal -= 5;
setTimeout('uiteenspatten()', 50);
}
else if(straal <= 120){
for(var i = 0; i < 12; i++){
document.getElementById('ster'+i).style.visibility = 'hidden';
}
aantal++;
setTimeout('begin()', 500);
}
} catch(e) {}
}
window.onload=begin;
</script>
<![endif]-->
uody
4th April 2011, 02:26 AM
کد شماره ی 67 کد پرواز پروانه
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!--Powered javascript code by WWW.SONYCARD20.COM-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>
<body>
<p>
<script language="JavaScript1.2">
//specify path to cursor image
var cursorpath="http://www.sonycard20.com/fly2.gif"
if (document.layers)
{document.write("<LAYER NAME='PoInTeRs' LEFT=800 TOP=10><img src='"+cursorpath+"' width=17 height=22></LAYER>")}
else if (document.all){document.write("<div id='pOiNtErS' style='position:absolute;top:10px;left:10px;width: 17px;height:22px;z-index:50'><img src='"+cursorpath+"' width=40 height=40></div>")}
count=-1;
move=1;
function Curve(){
abc=new Array(0,1,1,1,2,3,4,0,6,-1,-1,-1,-2,-3,-4,0,-6)
for (i=0; i < abc.length; i++)
{var C=Math.round(Math.random()*[i])}
howbend=abc[C];
setTimeout('Curve()',1900);
return howbend;
}
ypos=100;
xpos=100;
degree = 600;
function MoveRandom(){
PathBend=degree+=howbend;//ok!
y = 4*Math.sin(PathBend*Math.PI/180);
x = 6*Math.cos(PathBend*Math.PI/180);
if (document.layers){
ypos+=y;
xpos+=x;
document.PoInTeRs.top=ypos+window.pageYOffset;
document.PoInTeRs.left=xpos+window.pageXOffset;
}
else if (document.all){
ypos+=y;
xpos+=x;
document.all.pOiNtErS.style.top=ypos+document.body .scrollTop;
document.all.pOiNtErS.style.left=xpos+document.bod y.scrollLeft;
}
T=setTimeout('MoveRandom()',50);
}
function edges(){
if (document.layers){
if (document.PoInTeRs.left >= window.innerWidth-40+window.pageXOffset)degree=Math.round(Math.rando m()*45+157.5);
if (document.PoInTeRs.top >= window.innerHeight-30+window.pageYOffset)degree=Math.round(Math.rando m()*45-112.5);
if (document.PoInTeRs.top <= 2+window.pageYOffset) degree = Math.round(Math.random()*45+67.5);//OK!
if (document.PoInTeRs.left <= 2+window.pageXOffset) degree = Math.round(Math.random()*45-22.5);//OK!
}
else if (document.all)
{
if (document.all.pOiNtErS.style.pixelLeft >= document.body.offsetWidth-45+document.body.scrollLeft)degree=Math.round(Math .random()*45+157.5);
if (document.all.pOiNtErS.style.pixelTop >= document.body.offsetHeight-35+document.body.scrollTop)degree=Math.round(Math. random()*45-112.5);
if (document.all.pOiNtErS.style.pixelTop <= 2+document.body.scrollTop) degree = Math.round(Math.random()*45+67.5);//OK!
if (document.all.pOiNtErS.style.pixelLeft <= 2+document.body.scrollLeft) degree = Math.round(Math.random()*45-22.5);//OK!
}
setTimeout('edges()',100);
}
function starteffect(){
Curve();
MoveRandom();// onUnload="opener.gO()"
edges();
}
if (document.all||document.layers)
window.onload=starteffect
</script>
</p>
</body>
</html>
<!--END CODE - Powered java script code by WWW.SONYCARD20.COM-->
uody
4th April 2011, 02:33 AM
کد شماره ی 68کد پرتاب ستاره
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!--Powered javascript code by WWW.SONYCARD20.COM-->
<body>
<script LANGUAGE="JavaScript1.2">
<!--
//set Interval between each firework display,
var intervals=2000
var sparksOn = true;
var speed = 25;
var power = 1;
//Dont change these values-------
var documentWidth=documentHeight=randomx=randomy=leftc orner=topcorner=0
var ns=(document.layers);
var ie=(document.all);
var sparksAflyin = false;
var allDivs = new Array(10);
var totalSparks = 0;
//-------------------------------
function initAll(){
if(!ns && !ie){
sparksOn = false;
return;
}
setInterval("firework()",intervals)
if (ns)
document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE);
for(dNum=0; dNum<7; ++dNum){
if(ie)
allDivs[dNum]=eval('document.all.sDiv'+dNum+'.style');
else
allDivs[dNum]=eval('document.layers["sDiv'+dNum+'"]');
}
}
function firework(){
//below code detects the browser dimenions
if (ie){
documentWidth=document.body.clientWidth
documentHeight=document.body.clientHeight
leftcorner=document.body.scrollLeft
topcorner=document.body.scrollTop
}
else if (ns){
documentWidth=window.innerWidth
documentHeight=window.innerHeight
leftcorner=pageXOffset
topcorner=pageYOffset
}
//below code randomly generates a set of coordinates that fall within the dimension
randomx=leftcorner+Math.floor(Math.random()*docume ntWidth)
randomy=topcorner+Math.floor(Math.random()*documen tHeight)
if(sparksOn){
if(!sparksAflyin){
sparksAflyin=true;
totalSparks=0;
for(var spark=0;spark<=6;spark++){
dx=Math.round(Math.random()*50);
dy=Math.round(Math.random()*50);
moveTo(spark,randomx,randomy,dx,dy);
}
}
}
}
function moveTo(i,tempx,tempy,dx,dy){
if(ie){
if(tempy+80>(document.body.offsetHeight+document.body.scrollTo p))
tempy=document.body.offsetHeight+document.body.scr ollTop-80;
if(tempx+80>(document.body.offsetWidth+document.body.scrollLef t))
tempx=document.body.offsetWidth+document.body.scro llLeft-80;
}
if(tempx>-50&&tempy>-50){
tempx+=dx;tempy+=dy;
allDivs[i].left=tempx;
allDivs[i].top=tempy;
dx-=power;dy-=power;
setTimeout("moveTo("+i+","+tempx+","+tempy+","+dx+","+dy+")",speed)
}
else
++totalSparks
if(totalSparks==7){
sparksAflyin=false;
totalSparks=0;
}
}
window.onload=initAll
//End-->
</script>
<style>
#sDiv0 {position:absolute; height:1; width:1; font-family:arial black; font-size:25px; color:Aqua;}
#sDiv1 {position:absolute; height:1; width:1; font-family:arial black; font-size:22px; color:red;}
#sDiv2 {position:absolute; height:1; width:1; font-family:arial black; font-size:20px; color:blue;}
#sDiv3 {position:absolute; height:1; width:1; font-family:arial black; font-size:15px; color:orange;}
#sDiv4 {position:absolute; height:1; width:1; font-family:arial black; font-size:25px; color:yellow;}
#sDiv5 {position:absolute; height:1; width:1; font-family:arial black; font-size:25px; color:lightgreen;}
#sDiv6 {position:absolute; height:1; width:1; font-family:arial black; font-size:20px; color:silver;}
</style>
<p></p>
<div id="sDiv0">
*</div>
<div id="sDiv1">
*</div>
<div id="sDiv2">
*</div>
<div id="sDiv3">
*</div>
<div id="sDiv4">
*</div>
<div id="sDiv5">
*</div>
<div id="sDiv6">
*</div>
</body>
</html>
<!--END CODE - Powered java script code by WWW.SONYCARD20.COM-->
<a href='http://www.kkrcity.com' target='_blank' ><img src='http://www.kkrcity.com/logo.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
uody
4th April 2011, 02:58 AM
کد شماره ی 69کد قیمت رورانه طلا و ارز در بازار جهانی
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- Dollar source code , Powered javascript code by WWW.khafankadeh.7p.COM--><iframe src="http://www.javakhafan.7p.com/dollar.asp" width="145" height="219" align="top" name="sony" scrolling="no" border="0" frameborder="0" style="border: 1px solid #FFCC00"></TD></TR></TABLE></BODY></HTML></iframe><!-- END DOLLAR PRICE IRAN -->
uody
4th April 2011, 06:45 PM
کد شماره ی 70 کد حرکت عکس پشت ضمینه
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!--Powered javascript code by WWW.khafankadeh.7p.COM-->
<meta http-equiv="Content-Language" content="en-us">
<BODY aLink=#003399 bgColor=#ffffff leftMargin=0 link=#003399 text=#000000
topMargin=0 vLink=#003399 MARGINHEIGHT="0" MARGINWIDTH="0" background="http://www.khafankadeh.7p.com.com/back5.gif"><!-- Start: ToolBar V2.0-->
<SCRIPT language=JavaScript
src="Welcome/local.js"></SCRIPT>
<script language="VBScript">
dim i, pic
i = -100000
pic = document.body.sourceIndex
sub scrollBG
i=i+1
Document.all(pic).style.BackgroundPosition= "0 " & i
id=SetTimeOut("scrollBG", 64, "VBScript")
end sub
scrollBG
</script>
<p align="center"> </p>
<p align="center"><b><a href="http://www.sonycard20.com">
<font color="#FF0000" size="7">www.sonycard20.com</font></a></b></p>
<!--END CODE - Powered java script code by WWW.khafankadeh.7p.COM-->
uody
4th April 2011, 06:47 PM
کد شماره ی 71 کد ساعت و تاریخ در استاتوس بار
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!--Powered javascript code by WWW.SONYCARD20.COM-->
<HTML>
<HEAD>
<TITLE>Clock And Date</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide JavaScript From Java-Impaired Browsers
var timerID = null
var timerRunning = false
function MakeArray(size)
{
this.length = size;
for(var i = 1; i <= size; i++)
{
this[i] = "";
}
return this;
}
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false
}
function showtime () {
var now = new Date();
var year = now.getYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var day = now.getDay();
Day = new MakeArray(7);
Day[0]="SUN";
Day[1]="MON";
Day[2]="TUE";
Day[3]="WED";
Day[4]="THU";
Day[5]="FRI";
Day[6]="SAT";
var timeValue = "";
timeValue += (Day[day]) + " ";
timeValue += ((month < 10) ? " 0" : " ") + month + "-";
timeValue += date + "-" + year + " ";
timeValue += ((hours <= 12) ? hours : hours - 12);
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
timeValue += (hours < 12) ? " AM" : " PM";
window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true
}
function startclock () {
stopclock();
showtime()
}
// End Hiding -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080" onLoad="startclock();">
uody
4th April 2011, 06:54 PM
کد شماره ی 72 کدعکس به دنبال موس
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<head>
<style type="text/css">
<!--
h1 {
color:#cc3333;
font-family:"Comic Sans MS",Helvetica;
}
h3 {
color:#993333;
font-family:"Comic Sans MS",Helvetica;
}
.kisser {
position:absolute;
top:0;
left:0;
visibility:hidden;
}
-->
</style>
<script language="JavaScript1.2" type="text/JavaScript">
<!-- cloak
//Kissing trail- By dij8 (dij8@dij8.com)
//Modified by Dynamic Drive for bug fixes
//Visit http://www.dynamicdrive.com for this script
kisserCount = 10 //maximum number of images on screen at one time
curKisser = 0 //the last image DIV to be displayed (used for timer)
kissDelay = 500 //duration images stay on screen (in milliseconds)
kissSpacer = 40 //distance to move mouse b4 next heart appears
theimage = "http://www.geocities.com/loghmanuplod/ax/lab.gif" //the 1st image to be displayed
theimage2 = "http://www.geocities.com/loghmanuplod/ax/ghalb.gif" //the 2nd image to be displayed
//Browser checking and syntax variables
var docLayers = (document.layers) ? true:false;
var docId = (document.getElementById) ? true:false;
var docAll = (document.all) ? true:false;
var docbitK = (docLayers) ? "document.layers['":(docId) ? "document.getElementById('":(docAll) ? "document.all['":"document."
var docbitendK = (docLayers) ? "']":(docId) ? "')":(docAll) ? "']":""
var stylebitK = (docLayers) ? "":".style"
var showbitK = (docLayers) ? "show":"visible"
var hidebitK = (docLayers) ? "hide":"hidden"
var ns6=document.getElementById&&!document.all
//Variables used in script
var posX, posY, lastX, lastY, kisserCount, curKisser, kissDelay, kissSpacer, theimage
lastX = 0
lastY = 0
//Collection of functions to get mouse position and place the images
function doKisser(e) {
posX = getMou***Pos(e)
posY = getMouseYPos(e)
if (posX>(lastX+kissSpacer)||posX<(lastX-kissSpacer)||posY>(lastY+kissSpacer)||posY<(lastY-kissSpacer)) {
showKisser(posX,posY)
lastX = posX
lastY = posY
}
}
// Get the horizontal position of the mouse
function getMou***Pos(e) {
if (document.layers||ns6) {
return parseInt(e.pageX+10)
} else {
return (parseInt(event.clientX+10) + parseInt(document.body.scrollLeft))
}
}
// Get the vartical position of the mouse
function getMouseYPos(e) {
if (document.layers||ns6) {
return parseInt(e.pageY)
} else {
return (parseInt(event.clientY) + parseInt(document.body.scrollTop))
}
}
//Place the image and start timer so that it disappears after a period of time
function showKisser(x,y) {
var processedx=ns6? Math.min(x,window.innerWidth-75) : docAll? Math.min(x,document.body.clientWidth-55) : x
if (curKisser >= kisserCount) {curKisser = 0}
eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".left = " + processedx)
eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".top = " + y)
eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".visibility = '" + showbitK + "'")
if (eval("typeof(kissDelay" + curKisser + ")")=="number") {
eval("clearTimeout(kissDelay" + curKisser + ")")
}
eval("kissDelay" + curKisser + " = setTimeout('hideKisser(" + curKisser + ")',kissDelay)")
curKisser += 1
}
//Make the image disappear
function hideKisser(knum) {
eval(docbitK + "kisser" + knum + docbitendK + stylebitK + ".visibility = '" + hidebitK + "'")
}
function kissbegin(){
//Let the browser know when the mouse moves
if (docLayers) {
document.captureEvents(Event.MOUSEMOVE)
document.onMouseMove = doKisser
} else {
document.onmousemove = doKisser
}
}
window.onload=kissbegin
// decloak -->
</script>
</head>
<body>
<script language="JavaScript" type="text/JavaScript">
<!-- cloak
// Add all DIV's of hearts
if (document.all||document.getElementById||document.l ayers){
for (k=0;k<kisserCount;k=k+2) {
document.write('<div id="kisser' + k + '" class="kisser"><img src="' + theimage + '" alt="" border="0"></div>\n')
document.write('<div id="kisser' + (k+1) + '" class="kisser"><img src="' + theimage2 + '" alt="" border="0"></div>\n')
}
}
// decloak -->
</script>
uody
4th April 2011, 07:04 PM
کد شماره ی 73 کد بازی پازل در سایت
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<!-- lmahmood www.khafankadeh.7p.com ----------------------------------------------->
<style>
.bigcell {
background-color:#aa9966;
border:4px solid #aa9966;
text-align:center;
}
.cell {
width:40px;
height:40px;
font-family:Verdana, Arial;
font-size:10pt;
font-weight:bold;
background-color:#996633;
color:#ffff33;
border-top:2px solid #aa9966;
border-left:2px solid #aa9966;
border-right:2px solid #663300;
border-bottom:2px solid #663300;
text-align:center;
}
.hole {
width:40px;
height:40px;
background-color:#aa9966;
text-align:center;
}
body, h1, h2, h3, .msg, capt1, capt2 {font-family:Verdana,Comic Sans MS,Arial;}
body {margin:0px;}
h1 {font-size:28pt; font-weight:bold; margin-bottom:0px;}
h2 {font-size:16pt; margin:0px; font-weight:bold;}
h3 {font-size:8pt; margin:0px; font-weight:bold;}
.msg {font-size:8pt; font-weight:bold;}
.tab {cursor:hand;}
.capt1 {font-size:10pt; font-weight:bold;}
.capt2 {font-size:9pt; font-weight:bold;}
.capt3 {font-size:14pt; font-weight:bold; color:yellow;}
.capt4 {font-size:10pt; font-weight:bold; color:yellow;}
.but {font-size:9pt; font-weight:bold; height:30px;background-color:#aaaa99;}
</style>
</HEAD>
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->
<BODY onLoad="loadBoard(4)">
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original: Arun Narayanan (jusgames@lycos.com) -->
<!-- Web Site: http://jusgames.tripod.com -->
<script>
var gsize, ghrow, ghcol, gtime, gmoves, gintervalid=-1, gshuffling;
function toggleHelp()
{
if (butHelp.value == "Hide Help")
{
help.style.display = "none";
butHelp.value = "Show Help";
}
else
{
help.style.display = "";
butHelp.value = "Hide Help";
}
}
//random number between low and hi
function r(low,hi)
{
return Math.floor((hi-low)*Math.random()+low);
}
//random number between 1 and hi
function r1(hi)
{
return Math.floor((hi-1)*Math.random()+1);
}
//random number between 0 and hi
function r0(hi)
{
return Math.floor((hi)*Math.random());
}
function startGame()
{
shuffle();
gtime = 0;
gmoves = 0;
tickTime();
gintervalid = setInterval("tickTime()",1000);
}
function stopGame()
{
if (gintervalid==-1) return;
clearInterval(gintervalid);
fldStatus.innerHTML = "";
gintervalid=-1;
}
function tickTime()
{
showStatus();
gtime++;
}
function checkWin()
{
var i, j, s;
if (gintervalid==-1) return; //game not started!
if (!isHole(gsize-1,gsize-1)) return;
for (i=0;i<gsize;i++)
for (j=0;j<gsize;j++)
{
if (!(i==gsize-1 && j==gsize-1)) //ignore last block (ideally a hole)
{
if (getValue(i,j)!=(i*gsize+j+1).toString()) return;
}
}
stopGame();
s = "<table cellpadding=4>";
s += "<tr><td align=center class=capt3>!! CONGRATS !!</td></tr>";
s += "<tr class=capt4><td align=center>You have done it in " + gtime + " secs ";
s += "with " + gmoves + " moves!</td></tr>";
s += "<tr><td align=center class=capt4>Your speed is " + Math.round(1000*gmoves/gtime)/1000 + " moves/sec</td></tr>";
s += "</table>";
fldStatus.innerHTML = s;
// shuffle();
}
function showStatus()
{
fldStatus.innerHTML = "Time: " + gtime + " secs Moves: " + gmoves
}
function showTable()
{
var i, j, s;
stopGame();
s = "<table border=3 cellpadding=0 cellspacing=0 bgcolor='#666655'><tr><td class=bigcell>";
s = s + "<table border=0 cellpadding=0 cellspacing=0>";
for (i=0; i<gsize; i++)
{
s = s + "<tr>";
for (j=0; j<gsize; j++)
{
s = s + "<td id=a_" + i + "_" + j + " onclick='move(this)' class=cell>" + (i*gsize+j+1) + "</td>";
}
s = s + "</tr>";
}
s = s + "</table>";
s = s + "</td></tr></table>";
return s;
}
function getCell(row, col)
{
return eval("a_" + row + "_" + col);
}
function setValue(row,col,val)
{
var v = getCell(row, col);
v.innerHTML = val;
v.className = "cell";
}
function getValue(row,col)
{
// alert(row + "," + col);
var v = getCell(row, col);
return v.innerHTML;
}
function setHole(row,col)
{
var v = getCell(row, col);
v.innerHTML = "";
v.className = "hole";
ghrow = row;
ghcol = col;
}
function getRow(obj)
{
var a = obj.id.split("_");
return a[1];
}
function getCol(obj)
{
var a = obj.id.split("_");
return a[2];
}
function isHole(row, col)
{
return (row==ghrow && col==ghcol) ? true : false;
}
function getHoleInRow(row)
{
var i;
return (row==ghrow) ? ghcol : -1;
}
function getHoleInCol(col)
{
var i;
return (col==ghcol) ? ghrow : -1;
}
function shiftHoleRow(src,dest,row)
{
var i;
//conversion to integer needed in some cases!
src = parseInt(src);
dest = parseInt(dest);
if (src < dest)
{
for (i=src;i<dest;i++)
{
setValue(row,i,getValue(row,i+1));
setHole(row,i+1);
}
}
if (dest < src)
{
for (i=src;i>dest;i--)
{
setValue(row,i,getValue(row,i-1));
setHole(row,i-1);
}
}
}
function shiftHoleCol(src,dest,col)
{
var i;
//conversion to integer needed in some cases!
src = parseInt(src);
dest = parseInt(dest);
if (src < dest)
{//alert("src=" + src +" dest=" + dest + " col=" + col);
for (i=src;i<dest;i++)
{//alert(parseInt(i)+1);
setValue(i,col,getValue(i+1,col));
setHole(i+1,col);
}
}
if (dest < src)
{
for (i=src;i>dest;i--)
{
setValue(i,col,getValue(i-1,col));
setHole(i-1,col);
}
}
}
function move(obj)
{
var r, c, hr, hc;
if (gintervalid==-1 && !gshuffling)
{
alert('Please press the "Start Game" button to start.')
return;
}
r = getRow(obj);
c = getCol(obj);
if (isHole(r,c)) return;
hc = getHoleInRow(r);
if (hc != -1)
{
shiftHoleRow(hc,c,r);
gmoves++;
checkWin();
return;
}
hr = getHoleInCol(c);
if (hr != -1)
{
shiftHoleCol(hr,r,c);
gmoves++;
checkWin();
return;
}
}
function shuffle()
{
var t,i,j,s,frac;
gshuffling = true;
frac = 100.0/(gsize*(gsize+10));
s = "% ";
for (i=0;i<gsize;i++)
{
s += "|";
for (j=0;j<gsize+10;j++)
{
window.status = "Loading " + Math.round((i*(gsize+10) + j)*frac) + s
if (j%2==0)
{
t = r0(gsize);
while (t == ghrow) t = r0(gsize); //skip holes
getCell(t,ghcol).click();
}
else
{
t = r0(gsize);
while (t == ghcol) t = r0(gsize); //skip holes
getCell(ghrow,t).click();
}
}
}
window.status = "";
gshuffling = false;
}
function loadBoard(size)
{
gsize = size;
board.innerHTML = showTable(gsize);
setHole(gsize-1,gsize-1);
//shuffle();
}
</script>
<body bgcolor="#C0C0C0" text="white">
<center>
<p>
<div id=test></div>
<table cellpadding=4>
<tr><td align=center>
<p align="left" style="margin-bottom: -10">
<a href="http://www.javascripts.persianblog.com" style="text-decoration: none">
<font style="font-size: 12pt; font-weight:700" face="Times New Roman">javascripts</font></a></p>
<p><b><font face="Times New Roman" color="#800000">C</font></b><font face="Times New Roman" color="#800000"><b>hoose Level: </B>
<select id=level onchange="loadBoard(parseInt(level.value))">
<option value='3'>3</option>
<option value='4' selected>4</option>
<script>
for (var i=5;i<=10;i++)
{
document.write("<option value='" + i + "'>" + i + "</option>");
}
</script>
</select></font><font face="Times New Roman" color="#800000"> </font>
</td></tr>
<tr><td align=center>
<input type=button class=but value="Start Game" onclick="startGame();">
<tr><td align=center id=fldStatus class=capt2>
</td></tr>
</table>
<div id=board></div>
<p>
<p>
<p><center>
</center><p>
<!-- Script Size: 10.06 KB -->
<!-- loghman --- javascripts.persianblog.com ----------------------------------------------->
uody
4th April 2011, 07:10 PM
کد شماره ی 74کد آمار بازدید کنندگان
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<BODY>
<center><div id="welcomebox" style="border:1px groove #EBEBEB; background-color:#EBEBEB; width:85; text-align:center; font-family:tahoma; font-size:8pt; height:13">.</div>
<SCRIPT LANGUAGE="JavaScript">
document.write("<FORM><INPUT TYPE=HIDDEN NAME='saved' value='1'></FORM>")
function welcome()
{
if(document.cookie == "")
{
var counting = "1";
var when = new Date()
document.cookie = "counting=; expires=" + when.toGMTString();
when.setMonth(when.getMonth() + 1)
var counting = document.forms[0].saved.value;
document.cookie = "counting="+counting+" `; expires=" + when.toGMTString()
document.all.welcomebox.innerHTML = " <<:::welcome :::>> ";
}
else
{
var get = document.cookie;
get = get.substring((get.indexOf("=")+1),get.length);
var count = get.split(" ");
count[0]++
document.all.welcomebox.innerHTML = "" + count[0] + " :آمار بازدید";
document.forms[0].saved.value=count[0];
saveit()
}
}
function saveit()
{
var when = new Date()
document.cookie = "counting=; expires=" + when.toGMTString();
when.setMonth(when.getMonth() + 1)
var counting = document.forms[0].saved.value;
document.cookie = "counting="+counting+"; expires=" + when.toGMTString()
}
welcome()
</SCRIPT>
</BODY>
uody
4th April 2011, 07:13 PM
کد شماره ی 75کد برداشتن تبلیغات بلاگ اسکای
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<body onload="javascript: document.getElementById('r74j').style.visibility = 'hidden';" href="javascript:void(0);">
uody
4th April 2011, 07:14 PM
کد شماره ی 76 کد قرار دادن تاریخ در سایت (همان روز) با نام روز
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<html>
<head>
<script language="javascript" type="text/javascript">
dayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
monName = new Array ("January","February","March","April","May","June","July","Auguest","September","October","November","December")
now = new Date
</script>
</head>
<body>
<script language="javascript" type="text/javascript">
document.write("<h3>Today is " + dayName[now.getDay()] + ", " + monName[now.getMonth()] + " " + now.getDate() + ".</h3>")
</script>
</body>
</html>
uody
4th April 2011, 07:18 PM
کد شماره ی 78 کد این که بفهمید بازدید کنندگانتان از کجا آمده اند
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
</script>
<font size="1"><script language="Javascript" src="http://www.downes.ca/referrers.js"></script></font></body>
</html>
</body>
</html>
</body>
</html>
</body>
</html>
uody
4th April 2011, 07:19 PM
کد شماره ی 79 کد باز شدن وب دیگری همراه صفحه وب شما
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<body onload="window.open('www.khafankadeh.7p.com')"> </body>
uody
4th April 2011, 07:21 PM
کد شماره ی 80کد بسته شدن صفحه سایت پس از مدتی معین
<a href='http://www.javakhafan.7p.com' target='_blank' ><img src='http://www.javakhafan.7p.com/JavaCity.gif' alt='بزرگترین سایت جاوا اسکریپت ایران ' width='100' height='40' border='0'>
<SCRIPT LANGUAGE="JavaScript">
<!--//hiding it
setTimeout("window.close();", 15000);
//end hiding it-->
</SCRIPT></body>
</html>
uody
4th April 2011, 07:22 PM
کد شماره ی 81 کد تغییر رنگ زمینه سایت توسط بازدیدکنندگان
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- ONE STEP TO INSTALL LIST CHANGER:
1. Paste the coding into the BODY of the HTML document -->
<!-- STEP ONE: Copy this code into the BODY of your HTML document -->
<BODY>
<FORM>
<!--Total Java Scripts 99 - Next Step Software-->
<SELECT Size=5 name=clr onChange="document.bgColor=this.options[this.selectedIndex].value">
<OPTION VALUE="blue">blue
<OPTION VALUE="aquamarine">aquamarine
<OPTION VALUE="chocolate">chocolate
<OPTION VALUE="darkred">dark red
<OPTION VALUE="gold">gold
<OPTION VALUE="red">red
<OPTION VALUE="yellow">yellow
<OPTION VALUE="hotpink">hotpink
<OPTION VALUE="lime">lime
<OPTION VALUE="darkkhaki">dark khaki
<OPTION VALUE="cadetblue ">cadet blue
<OPTION VALUE="darkgoldenrod">dark goldenrod
<OPTION VALUE="darkslateblue">dark slate
<OPTION VALUE="blue">blue
<OPTION VALUE="deeppink">deep pink
<OPTION VALUE="darksalmon">dark salmon
<OPTION VALUE="salmon">salmon
<OPTION VALUE="tan">tan
<OPTION VALUE="wheat">wheat
<OPTION VALUE="tomato">tomato
<OPTION VALUE="springgreen">springgreen
<OPTION VALUE="turquoise">turquoise
<OPTION VALUE="white" SELECTED>White
</SELECT>
</FORM>
<!-- Script Size: 1.24 KB -->
uody
4th April 2011, 07:24 PM
کد شماره ی 82کد تایین صحت پسورد
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<html>
<head>
<script language="javascript" type="text/javascript">
function validForm(passForm){
if (passForm.passwd1.valu == "") {
alert("you must enter a password")
passForm.passwd1.focus()
return false
}
if(passForm.passwd1.value !=passForm.passwd2.value) {
alert("entered passwords did not match")
passForm.passwd1.focus()
passForm.passwd1.select()
return false
}
return true
}
</script>
</head>
<body><h3>
<form onSubmit="return validForm(this)" action="ok.asp">
Your name:<input type="text" size="30"><br>
Choose a password:<input type="password" name="passwd1" size="20"><br>
verify password:<input type="password" name="passwd2" size="20"><br>
<input type="Submit" value="Submit">
</form>
</h3>
</body>
</html>
uody
4th April 2011, 07:25 PM
کد شماره ی 83کد منوی متحرک کنار صفحه
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>َ
<SCRIPT>
NS6 = (document.getElementById&&!document.all)
IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")
tempBar='';barBuilt=0;ssmItems=new Array();
moving=setTimeout('null',1)
function moveOut() {
if ((NS6||NS)&&parseInt(ssm.left)<0 || IE && ssm.pixelLeft<0) {
clearTimeout(moving);moving = setTimeout('moveOut()', slideSpeed);slideMenu(10)}
else {clearTimeout(moving);moving=setTimeout('null',1)} };
function moveBack() {clearTimeout(moving);moving = setTimeout('moveBack1()', waitTime)}
function moveBack1() {
if ((NS6||NS) && parseInt(ssm.left)>(-menuWidth) || IE && ssm.pixelLeft>(-menuWidth)) {
clearTimeout(moving);moving = setTimeout('moveBack1()', slideSpeed);slideMenu(-10)}
else {clearTimeout(moving);moving=setTimeout('null',1)} }
function slideMenu(num){
if (IE) {ssm.pixelLeft += num;}if (NS||NS6) {ssm.left = parseInt(ssm.left)+num;}
if (NS) {bssm.clip.right+=num;bssm2.clip.right+=num;}}
function makeStatic() {
if (NS||NS6) {winY = window.pageYOffset;}
if (IE) {winY = document.body.scrollTop;}
if (NS6||IE||NS) {
if (winY!=lastY&&winY>YOffset-staticYOffset) {
smooth = .2 * (winY - lastY - YOffset + staticYOffset);}
else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset) {
smooth = .2 * (winY - lastY - (YOffset-(YOffset-winY)));}
else {smooth=0}
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (IE) bssm.pixelTop+=smooth;
if (NS6||NS) bssm.top=parseInt(bssm.top)+smooth
lastY = lastY+smooth;
setTimeout('makeStatic()', 1)}}
function buildBar() {
if(barText.indexOf('<IMG')>-1) {tempBar=barText}
else{for (b=0;b<barText.length;b++) {tempBar+=barText.charAt(b)+"<BR>"}}
document.write('<td align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD>')}
function initSlide() {
if (NS6){ssm=document.getElementById("thessm").style;bssm=document.getElementById("basessm").style;
bssm.clip="rect(0 "+document.getElementById("thessm").offsetWidth+" "+document.getElementById("thessm").offsetHeight+" 0)";ssm.visibility="visible";}
else if (IE) {ssm=document.all("thessm").style;bssm=document.all("basessm").style
bssm.clip="rect(0 "+thessm.offsetWidth+" "+thessm.offsetHeight+" 0)";bssm.visibility = "visible";}
else if (NS) {bssm=document.layers["basessm1"];
bssm2=bssm.document.layers["basessm2"];ssm=bssm2.document.layers["thessm"];
bssm2.clip.left=0;ssm.visibility = "show";}
if (menuIsStatic=="yes") makeStatic();}
function buildMenu() {
if (IE||NS6) {document.write('<DIV ID="basessm" style="visibility:hidden;Position : Absolute ;Left : '+XOffset+' ;Top : '+YOffset+' ;Z-Index : 20;width:'+(menuWidth+barWidth+10)+'"><DIV ID="thessm" style="Position : Absolute ;Left : '+(-menuWidth)+' ;Top : 0 ;Z-Index : 20;" onmouseover="moveOut()" onmouseout="moveBack()">')}
if (NS) {document.write('<LAYER name="basessm1" top="'+YOffset+'" LEFT='+XOffset+' visibility="show"><ILAYER name="basessm2"><LAYER visibility="hide" name="thessm" bgcolor="'+menuBGColor+'" left="'+(-menuWidth)+'" onmouseover="moveOut()" onmouseout="moveBack()">')}
if (NS6){document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth+0)+'" bgcolor="'+menuBGColor+'"><TR><TD>')}
document.write('<table border="0" cellpadding="0" cellspacing="0" width="'+(menuWidth+barWidth+0)+'" bgcolor="'+menuBGColor+'">');
for(i=0;i<ssmItems.length;i++) {
if(!ssmItems[i][3]){ssmItems[i][3]=menuCols;ssmItems[i][5]=menuWidth-1}
else if(ssmItems[i][3]!=menuCols)ssmItems[i][5]=Math.round(menuWidth*(ssmItems[i][3]/menuCols)-1);
if(ssmItems[i-1]&&ssmItems[i-1][4]!="no"){document.write('<TR>')}
if(!ssmItems[i][1]){
document.write('<td bgcolor="'+hdrBGColor+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'" WIDTH="'+ssmItems[i][5]+'" COLSPAN="'+ssmItems[i][3]+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+ssmItems[i][0]+'</b></font></td>')}
else {if(!ssmItems[i][2])ssmItems[i][2]=linkTarget;
document.write('<TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="'+ssmItems[i][5]+'" COLSPAN="'+ssmItems[i][3]+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><DIV ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+ssmItems[i][1]+'" target="'+ssmItems[i][2]+'" CLASS="new">'+ssmItems[i][0]+'</DIV></LAYER></ILAYER></TD>')}
if(ssmItems[i][4]!="no"&&barBuilt==0){buildBar();barBuilt=1}
if(ssmItems[i][4]!="no"){document.write('</TR>')}}
document.write('</table>')
if (NS6){document.write('</TD></TR></TABLE>')}
if (IE||NS6) {document.write('</DIV></DIV>')}
if (NS) {document.write('</LAYER></ILAYER></LAYER>')}
theleft=-menuWidth;lastY=0;setTimeout('initSlide();', 1)}
YOffset=1;
XOffset=0;
staticYOffset=0;
slideSpeed=20
waitTime=100;
menuBGColor="black";
menuIsStatic="yes";
menuWidth=130;
menuCols=2;
hdrFontFamily="arial";
hdrFontSize="2";
hdrFontColor="white";
hdrBGColor="white";
hdrAlign="left";
hdrVAlign="center";
hdrHeight="15";
linkFontFamily="arial";
linkFontSize="2";
linkBGColor="gray";
linkOverBGColor="red";
linkTarget="_top";
linkAlign="left";
barBGColor="black";
barFontFamily="arial";
barFontSize="3";
barFontColor="white";
barVAlign="center";
barWidth=18;
barText="MaHmOoD"
ssmItems[0]=["home", "http://khafankadeh.tk/", "_parent"]
ssmItems[1]=["E-mail us", "kkr129@yahoo.com/", "_parent"]
ssmItems[2]=["hmahmood ", "http://www.khafankadeh.7p.com", "_parent"]
ssmItems[3]=["Download", "http://www.hackeran.7p.com","_parent"]
buildMenu();
</SCRIPT>
uody
4th April 2011, 07:26 PM
کد شماره ی 84 کد توضیح یک لینک در استاتوس بار
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<html>
<head>
</head>
<body>
<h1>
<a href="http://www.khafankadeh.7p.com" onMouseover="window.status='Hiva web site !';return true" onMouseout="window.status='';return true">MahmoodBina KKR Corp</a>
</h1>
</body>
</html>
uody
4th April 2011, 07:27 PM
کد شماره ی 85 کد ساعت دینامیکی
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<SCRIPT
LANGUAGE="JavaScript">
var timerID = null;
var timerRunning = false;
function stopclock ()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime ()
{
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
document.clock.face.value = timeValue;
// you could replace the above with this
// and have a clock on the status bar:
// window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock ()
{
// Make sure the clock is stopped
stopclock();
showtime();
}
</SCRIPT>
<BODY onLoad="startclock(); timerONE=window.setTimeout"
TEXT="ffffff">
<CENTER><form name="clock" onSubmit="0">
<input type="text" name="face" size=13 value="" style="background-color: #FF9900"></CENTER>
uody
4th April 2011, 07:28 PM
کد شماره ی 86 کد فرم گذاری برای سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- TWO STEPS TO INSTALL CUSTOMIZED WINDOW:
1. Paste the coding into the HEAD of your HTML document
2. Put the last code into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function customize(form) {
var address = document.form1.url.value;
var op_tool = (document.form1.tool.checked== true) ? 1 : 0;
var op_loc_box = (document.form1.loc_box.checked == true) ? 1 : 0;
var op_dir = (document.form1.dir.checked == true) ? 1 : 0;
var op_stat = (document.form1.stat.checked == true) ? 1 : 0;
var op_menu = (document.form1.menu.checked == true) ? 1 : 0;
var op_scroll = (document.form1.scroll.checked == true) ? 1 : 0;
var op_resize = (document.form1.resize.checked == true) ? 1 : 0;
var op_wid = document.form1.wid.value;
var op_heigh = document.form1.heigh.value;
var option = "toolbar="+ op_tool +",location="+ op_loc_box +",directories="
+ op_dir +",status="+ op_stat +",menubar="+ op_menu +",scrollbars="
+ op_scroll +",resizable=" + op_resize +",width=" + op_wid +",height="+ op_heigh;
var win3 = window.open("", "what_I_want", option);
var win4 = window.open(address, "what_I_want");
}
function clear(form) {
document.form1.wid.value="";
document.form1.heigh.value="";
}
// End -->
</SCRIPT>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<CENTER>
<h4>Please choose from the following selections to customize your window</h4>
<br>
<TABLE cellpadding=5 border><TR><TD><PRE>
<FORM name=form1 ACTION="javascript:" METHOD="POST">
<INPUT TYPE="text" NAME="url" value="http://www.khafankadeh.7p.com" >: URL
<INPUT TYPE="checkbox" NAME="tool">: Toolbar
<INPUT TYPE="checkbox" NAME="loc_box">: Location
<INPUT TYPE="checkbox" NAME="dir">: Directories
<INPUT TYPE="checkbox" NAME="stat">: Status
<INPUT TYPE="checkbox" NAME="menu">: Menubar
<INPUT TYPE="checkbox" NAME="scroll">: Scrollbars
<INPUT TYPE="checkbox" NAME="resize">: Resizable
<INPUT TYPE="text" NAME="wid" value= >: Width
<INPUT TYPE="text" NAME="heigh" value=>: Height
<BR><CENTER>
<INPUT TYPE="button" VALUE="=ENTER=" OnClick="customize(this.form)">
<INPUT TYPE="reset" VALUE="=RESET=" onClick="clear(this.form)">
</PRE></TD></TR></TABLE>
</FORM>
</CENTER><p><center>
<font face="arial, helvetica" size="-2">
<!-- Script Size: 2.54 KB -->
</font></center></center>
uody
4th April 2011, 07:29 PM
کد شماره ی 87 کد نمایش جملات از کوچک به بزرگ
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<SCRIPT LANGUAGE="JavaScript">
<!-- Web Site: http://khafankadeh.7p.com -->
<!-- Begin
var speed = 50;
var cycledelay = 2000;
var maxsize = 28;
var x = 0;
var y = 0;
var themessage, size;
var esize = "</font>";
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
var themessage2 = new initArray(
"HI",
"WELCOME",
"TO MY",
"WEBLOG"
);
if(navigator.appName == "Netscape")
document.write('<layer id="wds"></layer><br>');
if (navigator.appVersion.indexOf("MSIE") != -1)
document.write('<span id="wds"></span><br>');
function upwords(){
themessage = themessage2[y];
if (x < maxsize) {
x++;
setTimeout("upwords()",speed);
}
else setTimeout("downwords()",cycledelay);
if(navigator.appName == "Netscape") {
size = "<font point-size='"+x+"pt'>";
document.wds.document.write(size+"<center>"+themessage+"</center>"+esize);
document.wds.document.close();
}
if (navigator.appVersion.indexOf("MSIE") != -1){
wds.innerHTML = "<center>"+themessage+"</center>";
wds.style.fontSize=x+'px'
}
}
function downwords(){
if (x > 1) {
x--;
setTimeout("downwords()",speed);
}
else {
setTimeout("upwords()",cycledelay);
y++;
if (y > themessage2.length - 1) y = 0;
}
if(navigator.appName == "Netscape") {
size = "<font point-size='"+x+"pt'>";
document.wds.document.write(size+"<center>"+themessage+"</center>"+esize);
document.wds.document.close();
}
if (navigator.appVersion.indexOf("MSIE") != -1){
wds.innerHTML = "<center>"+themessage+"</center>";
wds.style.fontSize=x+'px'
}
}
setTimeout("upwords()",speed);
// End -->
</script>
</body>
</html>
uody
4th April 2011, 07:35 PM
کد شماره ی 88 کد نشان دهنده مدت عمر اشخاص
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- THREE STEPS TO INSTALL AGE CALCULATOR:
1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Dev Pragad (devpragad@yahoo.com) -->
<!-- Web Site: http://www.geocities.com/devpragad -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function start() {
document.form1.day.value = "";
document.form1.month.value = "";
document.form1.year.value = "";
document.form1.age.value = "";
document.form1.months.value = "";
document.form1.weeks.value = "";
document.form1.answer.value = "";
document.form1.hours.value = "";
document.form1.min.value = "";
document.form1.sec.value = "";
document.form1.bday.value = "";
document.form1.milli.value = "";
}
function run() {
var ap;
dd = document.form1.day.value;
mm = document.form1.month.value;
yy = document.form1.year.value;
with(document.form1) {
ap = parseInt(ampm.selectedIndex);
hr = parseInt(hrs.value);
if(hr <= 0 && hr >= 13) {
ap = null;
alert("asdf")
}
}
main="valid";
if ((mm < 1) || (mm > 12) || (dd < 1) || (dd > 31) || (yy < 1) ||(mm == "") || (dd == "") || (yy == ""))
main = "Invalid";
else
if (((mm == 4) || (mm == 6) || (mm == 9) || (mm == 11)) && (dd > 30))
main = "Invalid";
else
if (mm == 2) {
if (dd > 29)
main = "Invalid";
else if((dd > 28) && (!lyear(yy)))
main="Invalid";
}
else
if((yy > 9999)||(yy < 0))
main = "Invalid";
else
main = main;
if(main == "valid") {
function leapyear(a) {
if(((a % 4 == 0) && (a % 100 != 0)) || (a % 400 == 0))
return true;
else
return false;
}
days = new Date();
gdate = days.getDate();
gmonth = days.getMonth();
gyear = days.getYear();
age = gyear - yy;
if((mm == (gmonth + 1)) && (dd <= parseInt(gdate))) {
age = age;
}
else {
if(mm <= (gmonth)) {
age = age;
}
else {
age = age - 1;
}
}
if(age == 0)
age = age;
document.form1.age.value=" You are " + age+ " years old & ";
if(mm <= (gmonth + 1))
age = age - 1;
if((mm == (gmonth + 1)) && (dd > parseInt(gdate)))
age = age + 1;
var m;
var n;
if (mm == 12) { n = 31 - dd; }
if (mm == 11) { n = 61 - dd; }
if (mm == 10) { n = 92 - dd; }
if (mm == 9) { n = 122 - dd; }
if (mm == 8) { n = 153 - dd; }
if (mm == 7) { n = 184 - dd; }
if (mm == 6) { n = 214 - dd; }
if (mm == 5) { n = 245 - dd; }
if (mm == 4) { n = 275 - dd; }
if (mm == 3) { n = 306 - dd; }
if (mm == 2) { n = 334 - dd; if(leapyear(yy)) n = n + 1; }
if (mm == 1) { n = 365 - dd; if (leapyear(yy)) n = n + 1; }
if (gmonth == 1) m = 31;
if (gmonth == 2) { m = 59; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 3) { m = 90; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 4) { m = 120; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 5) { m = 151; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 6) { m = 181; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 7) { m = 212; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 8) { m = 243; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 9) { m = 273; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 10) { m = 304; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 11) { m = 334; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 12) { m = 365; if (leapyear(gyear)) m = m + 1; }
totdays = (parseInt(age) * 365);
totdays += age / 4;
totdays = parseInt(totdays) + gdate + m + n;
document.form1.answer.value = "" + totdays +" days ";
months = age * 12;
months += 12 - parseInt(mm);
months += gmonth;
document.form1.months.value = months + " Months";
if (gmonth == 1) p = 31 + gdate;
if (gmonth == 2) { p = 59 + gdate; if (leapyear(gyear)) m = m + 1; }
if (gmonth == 3) { p = 90 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 4) { p = 120 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 5) { p = 151 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 6) { p = 181 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 7) { p = 212 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 8) { p = 243 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 9) { p = 273 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 10) { p = 304 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 11) { p = 334 + gdate; if (leapyear(gyear)) p = p + 1; }
if (gmonth == 12) { p = 365 + gdate; if (leapyear(gyear)) p = p + 1; }
weeks = totdays / 7;
weeks += " weeks";
weeks = parseInt(weeks);
document.form1.weeks.value = weeks + " Weeks";
var time = new Date();
ghour = time.getHours();
gmin = time.getMinutes();
gsec = time.getSeconds();
hour = ((age * 365) + n + p) * 24;
hour += (parseInt(age / 4) * 24);
if(ap == 0)
hour = hour - hr;
else {
if(ap == 1) {
hour = hour - (11 + hr)
}
}
document.form1.hours.value = hour + " Hours";
var min;
min = (hour * 60) + gmin;
document.form1.min.value = min + " Minutes";
sec = (min * 60) + gsec;
document.form1.sec.value = sec + " Seconds";
var millisec;
var gmil;
gmil = days.getMilliseconds();
millisec = (sec * 1000) + gmil;
document.form1.milli.value = millisec + " Milliseconds";
mm = mm - 1;
var r;
if(mm == 0) r = 1;
if(mm == 1) r = 31;
if(mm == 2) { r = 59; if (leapyear(gyear)) m = m + 1; }
if(mm == 3) { r = 90; if (leapyear(gyear)) r = r + 1; }
if(mm == 4) { r = 120; if (leapyear(gyear)) r = r + 1; }
if(mm == 5) { r = 151; if (leapyear(gyear)) r = r + 1; }
if(mm == 6) { r = 181; if (leapyear(gyear)) r = r + 1; }
if(mm == 7) { r = 212; if (leapyear(gyear)) r = r + 1; }
if(mm == 8) { r = 243; if (leapyear(gyear)) r = r + 1; }
if(mm == 9) { r = 273; if (leapyear(gyear)) r = r + 1; }
if(mm == 10) { r = 304; if (leapyear(gyear)) r = r + 1; }
if(mm == 11) { r = 334; if (leapyear(gyear)) r = r + 1; }
if(mm == 12) { r = 365; if (leapyear(gyear)) r = r + 1; }
mm = mm + 1;
r = parseInt(r) + parseInt(dd);
if( mm > (gmonth + 1)) {
bday = r - m - gdate;
}
else {
if(mm == (gmonth + 1) && (gdate < dd)) {
bday = (r - m - gdate);
}
else {
if((leapyear(gyear)) && ((mm > 2) && (dd < 29))) {
a = 366;
}
else {
a = 365;
}
bday = a + (r - m - gdate);
}
}
nhour = 24-parseInt(ghour);
nmin = 60 - parseInt(gmin);
nsec = 60 - parseInt(gsec);
go();
if(((bday == 366) && (leapyear(yy))) || ((bday == 365) && (!leapyear(yy)))) {
document.form1.bday.value = "today is your birthday";
alert("Happy Birthday");
} else {
document.form1.bday.value = bday + " days " + nhour + " hours " + nmin + " minutes " + nsec + " seconds";
setTimeout("run()", 1);
}
function go() {
function lyear(a) {
if(((a % 4 == 0) && (a % 100 != 0)) || (a % 400 == 0)) return true;
else return false;
}
mm = parseInt(mm);
dd = parseInt(dd);
yy = parseInt(yy);
if ((mm < 1) || (mm > 12) || (dd < 1) || (dd > 31) || (yy < 1) ||(mm == " ") || (dd == " ") || (yy == " ")) main="Invalid";
else
if (((mm == 4) || (mm == 6) || (mm == 9) || (mm == 11)) && (dd > 30)) main = "Invalid";
else
if (mm == 2) {
if (dd > 29)
main = "Invalid";
else
if(( dd > 28) && (!lyear(yy)))
main = "Invalid";
}
else main = main;
if(main == "valid") {
var m;
if (mm == 1) n = 31;
if (mm == 2) n = 59 + 1;
if (mm == 3) n = 90 + 1;
if (mm == 4) n = 120 + 1;
if (mm == 5) n = 151 + 1;
if (mm == 6) n = 181 + 1;
if (mm == 7) n = 212 + 1;
if (mm == 8) n = 243 + 1;
if (mm == 9) n = 273 + 1;
if (mm == 10) n = 304 + 1;
if (mm == 11) n = 334 + 1;
if (mm == 12) n = 365 + 1;
if((mm == 1)||(mm == 3)||(mm == 5)||(mm == 7)||(mm == 8)||(mm == 10)||(mm == 12))
n += 31 + dd;
else if((mm == 4)||(mm == 6)||(mm == 9)||(mm == 11))
n += 31 + dd + 1;
else if(mm == 2) {
if(lyear(yy)) n += 29 + dd - 3;
else if(!lyear(yy)) n += 28 + dd - 1;
}
fours = yy / 4;
hunds = yy / 100;
fhunds = yy / 400;
var day;
day = (yy + n + fours - hunds + fhunds) % 7;
day = parseInt(day)
switch(day)
{
case 1 : document.form1.age.value +=" you were born on a Sunday"
break
case 2 : document.form1.age.value +=" you were born on a Monday"
break
case 3 : document.form1.age.value +=" you were born on a Tuesday"
break
case 4 : document.form1.age.value +=" you were born on a Wednesday"
break
case 5 : document.form1.age.value +=" you were born on a Thursday"
break
case 6 : document.form1.age.value +=" you were born on a Friday"
break
case 7 : document.form1.age.value +=" you were born on a Saturday"
break
case 0 : document.form1.age.value +=" you were born on a Saturday"
break
}
}
else {
document.form1.age.value += main + " Date";
}
}
}
else {
document.form1.age.value = main + " Date";
document.form1.months.value = "";
document.form1.weeks.value = "";
document.form1.answer.value = "";
document.form1.hours.value = "";
document.form1.min.value = "";
document.form1.sec.value = "";
document.form1.bday.value = "";
document.form1.milli.value = "";
}
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->
<BODY onLoad="start()">
<!-- STEP THREE: Copy this code into the BODY of your HTML document -->
<CENTER>
<br>
Enter your date of birth
<br>
<FORM name=form1>
Month<INPUT name=month size=3>
Date<INPUT name=day size=3>
Year<INPUT name=year size=6>
Hours<INPUT name=hrs value=00 size=6>
<select size="1" name="ampm">
<option selected>AM</option>
<option>PM</option>
</select>
<INPUT name=start onclick=run() type=button value="Calculate">
<BR>
<BR>
<INPUT name=age size=55 value="Your age will be displayed here">
<BR>
<BR>
You have been living for:
<BR>
<TABLE border = 0>
<TBODY>
<TR>
<TD>In months:</TD>
<TD><INPUT name=months size=30></TD>
</TR>
<TR>
<TD>In weeks:</TD>
<TD><INPUT name=weeks size=30></TD>
</TR>
<TR>
<TD>In days:</TD>
<TD><INPUT name=answer size=30></TD>
</TR>
<TR>
<TD>In hours:</TD>
<TD><INPUT name=hours size=30></TD>
</TR>
<TR>
<TD>In minutes:</TD>
<TD><INPUT name=min size=30></TD>
</TR>
<TR>
<TD>In seconds:</TD>
<TD><INPUT name=sec size=30></TD>
</TR>
<TR>
<TD>In Milliseconds:</TD>
<TD><INPUT name=milli size=30></TD>
</TR>
</TBODY>
</TABLE>
Your next birthday will be in:
<BR>
<INPUT name=bday size=40>
</FORM>
</CENTER>
<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
<!-- Script Size: 10.86 KB -->
uody
4th April 2011, 07:37 PM
کد شماره ی 89 کد ساعت های زنده دنیا
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<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-1256">
<title>New Page 2</title>
</head>
<body>
<table border="0" width="200" cellspacing="0" cellpadding="3">
<form name="where">
<tr>
<td width="100%">
<select name="city" size="1" onchange="updateclock(this);">
<option value="" selected>Local time</option>
<option value="0">London GMT</option>
<option value="1">Rome</option>
<option value="7">Bangkok</option>
<option value="8">Hong Kong</option>
<option value="9">Tokyo</option>
<option value="10">Sydney</option>
<option value="12">Fiji</option>
<option value="-10">Hawaii</option>
<option value="-8">San Francisco</option>
<option value="-5">New York</option>
<option value="-3">Buenos Aires</option>
</select>
</td>
</tr>
<tr>
<td width="100%">
<script language="JavaScript">
/*
Drop Down World Clock- By Learn iran (http://www.webloger.5u.com)
Portions of code by Kurt @ http://www.webloger.5u.com/
This credit notice must stay intact
*/
if (document.all||document.getElementById)
document.write('<span id="worldclock" style="font:bold 16px Arial;"></span><br>')
zone=0;
isitlocal=true;
ampm='';
function updateclock(z){
zone=z.options[z.selectedIndex].value;
isitlocal=(z.options[0].selected)?true:false;
}
function WorldClock(){
now=new Date();
ofst=now.getTimezoneOffset()/60;
secs=now.getSeconds();
sec=-1.57+Math.PI*secs/30;
mins=now.getMinutes();
min=-1.57+Math.PI*mins/30;
hr=(isitlocal)?now.getHours():(now.getHours() + parseInt(ofst)) + parseInt(zone);
hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
if (hr < 0) hr+=24;
if (hr > 23) hr-=24;
ampm = (hr > 11)?"PM":"AM";
statusampm = ampm.toLowerCase();
hr2 = hr;
if (hr2 == 0) hr2=12;
(hr2 < 13)?hr2:hr2 %= 12;
if (hr2<10) hr2="0"+hr2
var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins)+':'+((secs < 10)?"0"+secs:secs)+' '+statusampm;
if (document.all)
worldclock.innerHTML=finaltime
else if (document.getElementById)
document.getElementById("worldclock").innerHTML=finaltime
else if (document.layers){
document.worldclockns.document.worldclockns2.docum ent.write(finaltime)
document.worldclockns.document.worldclockns2.docum ent.close()
}
setTimeout('WorldClock()',1000);
}
window.onload=WorldClock
//-->
</script>
<!--Place holder for NS4 only-->
<ilayer id="worldclockns" width=100% height=35><layer id="worldclockns2" width=100% height=35 left=0 top=0 style="font:bold 16px Arial;"></layer></ilayer>
<p>
<font face="arial" size="-2">This free script provided by
<a href="http://www.webloger.5u.com/">webloger site</a></font>
</td>
</form>
</tr>
</table>
</body>
</html>
uody
4th April 2011, 07:38 PM
کد شماره ی 90 کد fade in در سایت
<a href='http://www.khafankadeh.7p.com' target='_blank' ><img src='http://khafankadeh.7p.com/khafankadeh.gif' alt='بهترین و زیباترین کدهای جاوا اسکریپت به همراه آزمایش آن کد' width='100' height='40' border='0'>
<!-- TWO STEPS TO INSTALL FADE IN:
1. Paste the first code into the BODY of your HTML document
2. Change the destination URL to where visitors should be sent -->
<!-- STEP ONE: Paste this code into HEAD of your document -->
<BODY>
<SCRIPT LANGUAGE="Javascript">
<!-- Original: Fred S. Tucker (Slurpie_Tucker@yahoo.com) -->
<!-- Web URL: http://members.tripod.com/~Slurpies_Page -->
<! >
<! >
<!-- Begin
function makearray(n) {
this.length = n;
for(var i = 1; i <= n; i++)
this[i] = 0;
return this;
}
hexa = new makearray(16);
for(var i = 0; i < 10; i++)
hexa[i] = i;
hexa[10]="a"; hexa[11]="b"; hexa[12]="c";
hexa[13]="d"; hexa[14]="e"; hexa[15]="f";
function hex(i) {
if (i < 0)
return "00";
else if (i > 255)
return "ff";
else
return "" + hexa[Math.floor(i/16)] + hexa[i%16];
}
function setbgColor(r, g, b) {
var hr = hex(r); var hg = hex(g); var hb = hex(b);
document.bgColor = "#"+hr+hg+hb;
}
function fade(sr, sg, sb, er, eg, eb, step) {
for(var i = 0; i <= step; i++) {
setbgColor(
Math.floor(sr * ((step-i)/step) + er * (i/step)),
Math.floor(sg * ((step-i)/step) + eg * (i/step)),
Math.floor(sb * ((step-i)/step) + eb * (i/step)));
}
}
function fadein() {
fade(240,232,223,0,0,0,255);
}
fadein();
window.location="http://www.yoursite.com/fadein-page2.html";
// End -->
</SCRIPT>
</HEAD>
<!-- STEP TWO: Change the URL above to where visitors will be sent -->
<!-- Script Size: 1.56 KB -->
استفاده از تمامی مطالب سایت تنها با ذکر منبع آن به نام سایت علمی نخبگان جوان و ذکر آدرس سایت مجاز است
استفاده از نام و برند نخبگان جوان به هر نحو توسط سایر سایت ها ممنوع بوده و پیگرد قانونی دارد
vBulletin® v4.2.5, Copyright ©2000-2024, Jelsoft Enterprises Ltd.