جافا ـ ساعة وتاريخ
ساعة وتاريخ
<!-- ONE STEP TO INSTALL DATE & TIME STAMP: 1. Paste the coding into the BODY of your HTML document --> <!-- STEP ONE: Copy this code into the BODY of your HTML document --> <BODY> <CENTER> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin Stamp = new Date(); document.write('<font size="2" face="Arial"><B>' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getYear() + '</B></font><BR>'); var Hours; var Mins; var Time; Hours = Stamp.getHours(); if (Hours >= 12) { Time = " P.M."; } else { Time = " A.M."; } if (Hours > 12) { Hours -= 12; } if (Hours == 0) { Hours = 12; } Mins = Stamp.getMinutes(); if (Mins < 10) { Mins = "0" + Mins; } document.write('<font size="2" face="Arial"><B>' + Hours + ":" + Mins + Time + '</B></font>'); // End --> </SCRIPT> </CENTER>
ساعة وتاريخ وتوقيت جرينتش
<!-- ONE STEP TO INSTALL PAGE VIEWED DATE: 1. Paste the coding into the BODY of your HTML document --> <!-- STEP ONE: Copy this code into the BODY of your HTML document --> <BODY> <CENTER> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var now = new Date(); document.write("<BR><CENTER><FONT COLOR=800000>"); document.write("<B>Page viewed at: </B></FONT> <B>"+now+"</B><BR>"); // End --> </SCRIPT> </CENTER>
يخبرك بالوقت الذي قضيته في الصفحة
<!-- THREE STEPS TO INSTALL TIME ON PAGE (ALERT): 1. Paste the coding into the HEAD of your HTML document 2. Copy the onLoad event handler into the BODY tag 3. Add 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 var onHours = " "; var onMinutes = " "; var onSeconds = " "; var offHours = 0; var offMinutes = 0; var offSeconds = 0; var logSeconds = 0; var logMinutes = 0; var logHours = 0; var OnTimeValue = " "; var OffTimeValue = " "; var PageTimeValue = " "; function WinOpen() { getLogoffTime(); window.location="js_page_category.html" window.location="js_page_category.html" } function getLogonTime() { var now = new Date(); var ampm = (now.getHours() >= 12) ? " P.M." : " A.M." var Hours = now.getHours(); Hours = ((Hours > 12) ? Hours - 12 : Hours); var Minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes(); var Seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds(); OnTimeValue =(" " + Hours + Minutes + Seconds + " " + ampm); onHours = now.getHours(); onMinutes = now.getMinutes(); onSeconds = now.getSeconds(); } function getLogoffTime() { var now = new Date(); var ampm = (now.getHours() >= 12) ? " P.M." : " A.M." var Hours = now.getHours(); Hours = ((Hours > 12) ? Hours - 12 : Hours); var Minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes(); var Seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds(); OffTimeValue =(" " + Hours + Minutes + Seconds + " " + ampm); offHours = now.getHours(); offMinutes = now.getMinutes(); offSeconds = now.getSeconds(); timer(); } function timer() { if (offSeconds >= onSeconds) { logSeconds = offSeconds - onSeconds; } else { offMinutes -= 1; logSeconds = (offSeconds + 60) - onSeconds; } if (offMinutes >= onMinutes) { logMinutes = offMinutes - onMinutes; } else { offHours -= 1; logMinutes = (offMinutes + 60) - onMinutes; } logHours = offHours - onHours; logHours = ((logHours < 10) ? "0" : ":") + logHours; logMinutes = ((logMinutes < 10) ? ":0" : ":") + logMinutes; logSeconds = ((logSeconds < 10) ? ":0" : ":") +logSeconds; PageTimeValue =(" " + logHours + logMinutes + logSeconds); displayTimes(); } function displayTimes() { alert("\nLOG ON TIME : " +OnTimeValue+"\n\nLOG OFF TIME : "+OffTimeValue+"\n\nTIME ON PAGE : " + PageTimeValue); } // End --> </SCRIPT> <!-- STEP TWO: Add this onLoad event handler into the BODY tag --> <BODY onLoad="getLogonTime()"> <!-- STEP THREE: Put this code into the BODY of your HTML document --> <CENTER> <FORM> <INPUT TYPE="button" value="Time on Page" onClick="getLogoffTime()"> </FORM> </CENTER>
عداد يحسب لك الوقت الذي تقضيه في الصفحه
<!-- THREE STEPS TO INSTALL TIME ON PAGE (SECONDS): 1. Paste the coding into the HEAD of your HTML document 2. Copy the onLoad event handler into the BODY tag 3. Add 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 startday = new Date(); clockStart = startday.getTime(); function initStopwatch() { var myTime = new Date(); var timeNow = myTime.getTime(); var timeDiff = timeNow - clockStart; this.diffSecs = timeDiff/1000; return(this.diffSecs); } function getSecs() { var mySecs = initStopwatch(); var mySecs1 = ""+mySecs; mySecs1= mySecs1.substring(0,mySecs1.indexOf(".")) + " secs."; document.forms[0].timespent.value = mySecs1 window.setTimeout('getSecs()',1000); } // End --> </SCRIPT> <!-- STEP TWO: Add this onLoad event handler into the BODY tag --> <BODY onLoad="window.setTimeout('getSecs()',1)"> <!-- STEP THREE: Put this code into the BODY of your HTML document --> <CENTER> <FORM> <input size=9 name=timespent> </FORM> </CENTER>
ساعه جميلة
<html> <head> <title>JavaClock v2.3 Written by The Transcendent</title> </head> <body> <script language = "javascript"> <!-- <!-- JavaScript Clock v2.3 Written By The Transcendent --> <!-- Entire script is to be placed wherever you want the clock to be --> <!-- these are the only variables (9) that you have to change, do not change anything else --> /* !!!These specifications are supported in both IE and Netscape. You MUST give these variables a value!!! */ var clockwidth = 12 //specify the clock width var clockvalue = "--- Clock ---" //the text in the clock before the body is completly loaded (needs quotes) /* !!!!!extra clock looks only available in IE, not supported in netscape!!!! */ var clockfeatures = "yes" // do you want the extra looks? if no, you do not have to change the next 5 variables (must keep quotes around yes/no) var backcolor = "#000000" //specify background color (needs quotes) var textcolor = "#eeeeee" //specify text color (needs quotes) var borderstyle = "solid" //specify the type of border ((in quotes, type "original" for the normal style, regardless of your color and width specs) none,dotted,dashed,solid,double,groove,ridge,inset,outset) var bordercolor = "#a00000" //specify border color (needs quotes) (type in 0 for the borderwidth if you dont want one) var borderwidth = 1 //specify border width (a number in pixels, (type in 0 if you dont want one) var fontfamily = "Arial" //specify font type (needs quotes) (type in 'null' if you dont care) <!-- ok, everything is taken care of! now just save the page, sit back and enjoy! --> document.onLoad = setInterval('chngtme()',100) if (document.all && clockfeatures=="yes") {document.write("<style> #clock { background: "+backcolor+"; color: "+textcolor+((borderstyle!='original')?'; border: '+bordercolor+' '+borderwidth+'px '+borderstyle+';':';')+" font-family: "+fontfamily+";} </style>")} function chngtme() { var t=new Date() var AP=((t.getHours()>=12)?" P.M.":" A.M.") var timeValue=""+((t.getHours()>12)?t.getHours()-12:(t.getHours()==0)?12:t.getHours()) timeValue+=((t.getMinutes()<10)?":0":":")+t.getMinutes() timeValue+=((t.getSeconds()<10)?":0":":")+t.getSeconds() timeValue+=AP document.clock.face.value=timeValue } document.write('<center><form name="clock" Action="#"><input id="clock" TYPE="text" NAME="face" SIZE="'+clockwidth+'" VALUE="'+clockvalue+'"></form></center>') <!-- End JavaScript Clock v2.1 --> //--> </script> </body> </html>
يوم وتاريخ وساعة
paste this into the Body of your web page where you want the date to display --> <SCRIPT LANGUAGE="JavaScript"> var day=""; var month=""; var myweekday=""; var year=""; mydate = new Date(); myday = mydate.getDay(); mymonth = mydate.getMonth(); myweekday= mydate.getDate(); weekday= myweekday; myyear= mydate.getYear(); year = myyear if(myday == 0) day = " sunday, " else if(myday == 1) day = " monday, " else if(myday == 2) day = " tuesday, " else if(myday == 3) day = " wednesday, " else if(myday == 4) day = " thursday, " else if(myday == 5) day = " friday, " else if(myday == 6) day = " saturday, " if(mymonth == 0) { month = "january "} else if(mymonth ==1) month = "february " else if(mymonth ==2) month = "march " else if(mymonth ==3) month = "april " else if(mymonth ==4) month = "may " else if(mymonth ==5) month = "june " else if(mymonth ==6) month = "july " else if(mymonth ==7) month = "august " else if(mymonth ==8) month = "september " else if(mymonth ==9) month = "october " else if(mymonth ==10) month = "november " else if(mymonth ==11) month = "december " if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000)) year="19" + year; if (navigator.appName == "Netscape") year=1900 + year; document.write("<font face=Verdana size=2 color=ff0000>" + day + month); document.write(myweekday + ", " + year + "</font>"); </SCRIPT>
التاريخ
<body> <script LANGUAGE="JavaScript"> <!-- Begin var day=""; var month=""; var myweekday=""; var year=""; mydate = new Date(); myday = mydate.getDay(); mymonth = mydate.getMonth(); myweekday= mydate.getDate(); weekday= myweekday; myyear= mydate.getYear(); year = myyear if(myday == 0) day = " الأحد, " else if(myday == 1) day = " الأثنين, " else if(myday == 2) day = " الثلاثاء, " else if(myday == 3) day = " الاربعاء, " else if(myday == 4) day = " الخميس, " else if(myday == 5) day = " الجمعة, " else if(myday == 6) day = " السبت, " if(mymonth == 0) { month = "يناير "} else if(mymonth ==1) month = "فبراير " else if(mymonth ==2) month = "مارس " else if(mymonth ==3) month = "ابريل " else if(mymonth ==4) month = "مايو " else if(mymonth ==5) month = "يونيو " else if(mymonth ==6) month = "يوليو " else if(mymonth ==7) month = "اغسطس " else if(mymonth ==8) month = "سبتمبر " else if(mymonth ==9) month = "اكتوبر " else if(mymonth ==10) month = "نوفمبر " else if(mymonth ==11) month = "ديسمبر " document.write("<b><font face=Arial size=3> " + day + " " + myweekday + " - " ); document.write(month + " - "+ year + "</font></b>"); // End --> </script>
ساعة ملونة
<html> <head> <title>الرحال</title> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> </head> <body bgcolor="#FFFFFF" text="#000000"> <script language="VBScript"> Dim a Dim min1 Dim hr1 Dim sec1 'Initializes clock and tells it how to behave, when to start animation, etc Sub window_onload a = time min1 = minute(time) hr1 = hour(time) if hr1 > 12 then hr1 = hr1 - 12 end if sec1 = second(time) call sgSecondHand.Rotate(0,0,sec1*6 - 90) call sgMinuteHand.Rotate(0,0,min1*6 - 90) call sgHourHand.Rotate(0,0,hr1*360/12 - 90) call seq("Time").Play end Sub 'Sequencer initilization Sub Seq_OnInit Call seq("Time").at(0.000, "SecRot", -1, 1.000, 1) Call seq("Time").at(60.000, "MinRot", -1, 60.000, 1) Call seq("Time").at(0.000, "HourRot", -1, 1800.000, 1) End Sub 'rotates second hand of clock Sub SecRot Call sgSecondHand.Rotate(0,0,6) End Sub ' rotates minute hand of clock Sub MinRot Call sgMinuteHand.Rotate(0,0,6) End Sub ' rotates hour hand of clock Sub HourRot Call sgHourHand.Rotate(0,0,15) End Sub </script> <div id="MASTERLAYOUT" STYLE="POSITION:ABSOLUTE;WIDTH:300; HEIGHT:300;TOP:25%;LEFT:25%"> <div id="divTimeText" STYLE="POSITION:ABSOLUTE; WIDTH:200; HEIGHT:200; TOP:0; LEFT:0;z-index:2"> <br> <br> <br> <p align="center"> <font face="Verdana,Tahoma,Arial" size="5" color="YELLOW"> <BR> <BR> </font> </p> <OBJECT ID="SgNumbers" CLASSID = "CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" STYLE= "POSITION:ABSOLUTE; WIDTH:215; HEIGHT:200; TOP:0; LEFT:0;Z-INDEX:5" width="14" height="14"> <PARAM NAME="Line0001" VALUE="SetLineColor(255, 255, 255)"> <PARAM NAME="Line0002" VALUE="SetLineStyle(1)"> <PARAM NAME="Line0003" VALUE="SetFillStyle(1)"> <PARAM NAME="Line0004" VALUE="SetFillColor(255,255,255)"> <PARAM NAME="Line0005" VALUE="SetFont('ARIAL',24,650,0,0,0)"> <PARAM NAME="Line0006" VALUE="Text('1',30,-66,0"> <PARAM NAME="Line0007" VALUE="Text('2',60,-36,0"> <PARAM NAME="Line0008" VALUE="Text('3',70,4,0"> <PARAM NAME="Line0009" VALUE="Text('4',60,44,0"> <PARAM NAME="Line0010" VALUE="Text('5',30,74,0"> <PARAM NAME="Line0011" VALUE="Text('6',-10,89,0"> <PARAM NAME="Line0012" VALUE="Text('7',-50,79,0"> <PARAM NAME="Line0013" VALUE="Text('8',-85,44,0"> <PARAM NAME="Line0014" VALUE="Text('9',-95,4,0"> <PARAM NAME="Line0015" VALUE="Text('10',-85,-36,0"> <PARAM NAME="Line0016" VALUE="Text('11',-60,-61,0"> <PARAM NAME="Line0017" VALUE="Text('12',-20,-76,0"> </OBJECT> </div> <OBJECT ID="sgBackground" CLASSID = "CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" STYLE="POSITION:absolute; TOP:0; LEFT:0; WIDTH:200; HEIGHT:200" width="14" height="14"> <PARAM NAME="Line0001" VALUE="SetLineStyle(5)"> <PARAM NAME="Line0002" VALUE="SetFillStyle(11)"> <PARAM NAME="Line0003" VALUE="SetFillColor(255,0,0,0,0,255)"> <PARAM NAME="Line0004" VALUE="SetGradientFill(0,0,-100,-100,0)"> <PARAM NAME="Line0005" VALUE="Oval(-100,-100,200,200,0)"> </OBJECT> <div id="divClock" STYLE="POSITION:ABSOLUTE; WIDTH:200; HEIGHT:200; TOP:0; LEFT:0;"> <OBJECT ID="sgSecondHand" CLASSID = "CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" STYLE="POSITION:absolute; TOP:0; LEFT:0; WIDTH:200; HEIGHT:200; Z-INDEX:5" width="14" height="14"> <PARAM NAME="Line0001" VALUE="SetLineColor(255, 255, 255)"> <PARAM NAME="Line0002" VALUE="SetLineStyle(1)"> <PARAM NAME="Line0003" VALUE="SetFillColor(255,255,255)"> <PARAM NAME="Line0004" VALUE="SetFillStyle(1)"> <PARAM NAME="Line0005" VALUE="Rect(-5,-2,100,4,0)"> </OBJECT> <OBJECT ID="sgMinuteHand" CLASSID = "CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" STYLE="POSITION:absolute; TOP:0; LEFT:0; WIDTH:200; HEIGHT:200; Z-INDEX:5" width="14" height="14"> <PARAM NAME="Line0001" VALUE="SetLineColor(255, 0, 0)"> <PARAM NAME="Line0002" VALUE="SetLineStyle(1)"> <PARAM NAME="Line0003" VALUE="SetFillColor(255,0,0)"> <PARAM NAME="Line0004" VALUE="SetFillStyle(1)"> <PARAM NAME="Line0005" VALUE="Rect(-5,-3,85,6,0)"> </OBJECT> <OBJECT ID="sgHourHand" CLASSID = "CLSID:369303C2-D7AC-11D0-89D5-00A0C90833E6" STYLE="POSITION:ABSOLUTE; TOP:0; LEFT:0; WIDTH:200; HEIGHT:200; Z-INDEX:5" width="14" height="14"> <PARAM NAME="Line0001" VALUE="SetLineColor(0, 0, 255)"> <PARAM NAME="Line0002" VALUE="SetLineStyle(1)"> <PARAM NAME="Line0003" VALUE="SetFillColor(0,0,255)"> <PARAM NAME="Line0004" VALUE="SetFillStyle(1)"> <PARAM NAME="Line0005" VALUE="Rect(-5,-3,70,6,0)"> </OBJECT> </div> </div> <OBJECT ID="Seq" CLASSID="CLSID:B0A6BAE2-AAF0-11d0-A152-00A0C908DB96" width="14" height="14"> </OBJECT> </body> </html>
ساعة في شريط المهام
<html> <head> <title>الرحال</title> <script Language="JavaScript"> var timerID = null; var timerRunning = false; function stopclock (){ if(timerRunning) clearTimeout(timerID); timerRunning = false; } function showtime () { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds() var timeValue = "" + ((hours >12) ? hours -12 :hours) timeValue += ((minutes < 10) ? ":0" : ":") + minutes timeValue += ((seconds < 10) ? ":0" : ":") + seconds timeValue += (hours >= 12) ? " P.M." : " A.M." window.status = timeValue; timerID = setTimeout("showtime()",1000); timerRunning = true; } function startclock () { stopclock(); showtime(); } </script> </head> <body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080" onLoad="startclock()"> </body> </html>
ساعة وتاريخ في شريط المهام
<HTML> <HEAD> <TITLE>سهران</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();">
ساعة بتوقيت عربي
<html> <title>JavaScript Clock</title> <body bgcolor=ffffff text=000000> <SCRIPT LANGUAGE="JavaScript"> <!-- // Made by SportsFan // Page at http://suns.home.ml.org // Note: This was originally Rotating Banners depending on time; however, // I edited it into a clock... var timeNow=new Date(); var refresh=timeNow.getSeconds(); if(refresh>=50) refresh=1; if(refresh>=30) refresh=10; if(refresh>=5) refresh=20; var JSREFRESH=""+refresh+"" document.write("<meta http-equiv=Refresh content="+JSREFRESH+">"); //--> </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> <!-- // Made by SportsFan // Page at http://suns.home.ml.org // Note: This was originally Rotating Banners depending on time; however, // I edited it into a clock... var timeNow=new Date(); var now=timeNow.getMinutes(); var hour=timeNow.getHours(); if(now<=60) number=60; if(now<=59) number=59; if(now<=58) number=58; if(now<=57) number=57; if(now<=56) number=56; if(now<=55) number=55; if(now<=54) number=54; if(now<=53) number=53; if(now<=52) number=52; if(now<=51) number=51; if(now<=50) number=50; if(now<=49) number=49; if(now<=48) number=48; if(now<=47) number=47; if(now<=46) number=46; if(now<=45) number=45; if(now<=44) number=44; if(now<=43) number=43; if(now<=42) number=42; if(now<=41) number=41; if(now<=40) number=40; if(now<=39) number=39; if(now<=38) number=38; if(now<=37) number=37; if(now<=36) number=36; if(now<=35) number=35; if(now<=34) number=34; if(now<=33) number=33; if(now<=32) number=32; if(now<=31) number=31; if(now<=30) number=30; if(now<=29) number=29; if(now<=28) number=28; if(now<=27) number=27; if(now<=26) number=26; if(now<=25) number=25; if(now<=24) number=24; if(now<=23) number=23; if(now<=22) number=22; if(now<=21) number=21; if(now<=20) number=20; if(now<=19) number=19; if(now<=18) number=18; if(now<=17) number=17; if(now<=16) number=16; if(now<=15) number=15; if(now<=14) number=14; if(now<=13) number=13; if(now<=12) number=12; if(now<=11) number=11; if(now<=10) number=10; if(now<=9) number="09"; if(now<=8) number="08"; if(now<=7) number="07"; if(now<=6) number="06"; if(now<=5) number="05"; if(now<=4) number="04"; if(now<=3) number="03"; if(now<=2) number="02"; if(now<=1) number="01"; if(hour==24) hour=12; if(hour==23) hour=11; if(hour==22) hour=10; if(hour==21) hour=9; if(hour==20) hour=8; if(hour==19) hour=7; if(hour==18) hour=6; if(hour==17) hour=5; if(hour==16) hour=4; if(hour==15) hour=3; if(hour==14) hour=2; if(hour==13) hour=1; if(hour==12) hour=12; if(hour==11) hour=11; if(hour==10) hour=10; if(hour==9) hour=9; if(hour==8) hour=8; if(hour==7) hour=7; if(hour==6) hour=6; if(hour==5) hour=5; if(hour==4) hour=4; if(hour==3) hour=3; if(hour==2) hour=2; if(hour==1) hour=1; var JSHOUR=""+hour+"" var JSTIME=""+number+"" document.write("<center><table border=0 cellspacing=0 bgcolor=000000><tr><td>"); document.write("<center><font size=+2 color=ffffff>??EE ??C ?C E??I "+JSHOUR+":"+JSTIME+"</font></A></td></tr></table></center>"); //--> </SCRIPT> </body> </html>