عداد للعمر بمقاييس مختلفة
.
I Am...
...Years Old
Or...
...Days Old
...Hours Old
...Minutes Old
...Seconds Old
للحصول على الكود اصغط هنا
34
<head></head>انسخ وألصق بين الواصفتين
<SCRIPT LANGUAGE="JavaScript"> <!-- var acc=0 var show_time=false; var timerID=null; var blank=":"; function stopit() { if (show_time) clearTimeout(timerID); show_time=false; } function startit(form) { var today=new Date(); var curyear=today.getYear() if (curyear < 1000) curyear+=1900 var acc1=acc; var display_value =" Time: " + curyear if (today.getMinutes() < 10) { display_value+=":0" + today.getMinutes(); } else { display_value+=":" + today.getMinutes(); } if (today.getSeconds() < 10){ display_value+=":0" + today.getSeconds(); } else { display_value+=":" + today.getSeconds(); } if (today.getHours()>=12) { display_value+=" P.M. " } else { display_value+=" A.M. " } display_value += " Date: " + (today.getMonth()+1) + "/" + today.getDate() + "/" + curyear; window.status=display_value; writeyourAge(acc1) timerID=setTimeout("startit()",100); show_time=true; } function writeyourAge(onval) { if (onval == 0) { normal() } else { accurate() } } function normal() { TheDate = new Date(); Month = TheDate.getMonth(); Day = TheDate.getDate(); Year = TheDate.getYear(); if (Year< 1000) Year+=1900 Hour = TheDate.getHours(); Minute = TheDate.getMinutes(); Second = TheDate.getSeconds(); by = (document.my_age.birthy.value); bm = (document.my_age.birthm.value); bd = (document.my_age.birthd.value); bh = (document.my_age.birthh.value); bmn = (document.my_age.birthmin.value); bs = (document.my_age.births.value); BDate = Date.UTC(by,bm,bd,bh,bmn,bs); if (Year<2000) { CDate = Date.UTC(Year,Month,Day,Hour,Minute,Second); } else { CDate = Date.UTC(Year,Month,Day,Hour,Minute,Second); } Age = CDate-BDate + (1000*60*60*24*30); document.my_age.yrs.value = parseInt(((((Age/1000)/60)/60)/24)/365.25,10); document.my_age.dys.value = parseInt((((Age/1000)/60)/60)/24,10); document.my_age.hrs.value = parseInt(((Age/1000)/60)/60,10); document.my_age.mins.value = parseInt((Age/1000)/60,10); document.my_age.secs.value = parseInt(Age/1000,10); } function accurate() { TheDate = new Date(); Month = TheDate.getMonth(); Day = TheDate.getDate(); Year = TheDate.getYear(); if (Year< 1000) Year+=1900 Hour = TheDate.getHours(); Minute = TheDate.getMinutes(); Second = TheDate.getSeconds(); by = (document.my_age.birthy.value); bm = (document.my_age.birthm.value); bd = (document.my_age.birthd.value); bh = (document.my_age.birthh.value); bmn = (document.my_age.birthmin.value); bs = (document.my_age.births.value); BDate = Date.UTC(by,bm,bd,bh,bmn,bs); if (Year<2000) { CDate = Date.UTC(Year,Month,Day,Hour,Minute,Second); } else { CDate = Date.UTC(Year,Month,Day,Hour,Minute,Second); } Age = CDate-BDate + (1000*60*60*24*30); document.my_age.yrs.value = ((((Age/1000)/60)/60)/24)/365.25; document.my_age.dys.value = (((Age/1000)/60)/60)/24; document.my_age.hrs.value = ((Age/1000)/60)/60; document.my_age.mins.value = (Age/1000)/60; document.my_age.secs.value = Age/1000; } //--> </SCRIPT>
<body></body>انسخ وألصق بين الواصفتين
<form name="my_age"> <table width=460 border=0 cellspacing=0 cellpadding=2> <tr> <td align=center colspan=5>D.O.B Yr<input name="birthy" type="text" size=4> Mon<input name="birthm" type="text" size=2> Day<input name="birthd" type="text" size=2> Hr<input name="birthh" type="text" size=2> Min<input name="birthmin" type="text" size=2> Sec<input name="births" type="text" size=2> </td> </tr> <tr> <td align=center colspan=5> Accurate<input type="radio" name="accurate" value="ON" onClick="if (this.checked) {acc=1}"> Normal<input type="radio" name="accurate" Value="OFF" onClick="if (this.checked) {acc=0}" checked> <input type="button" name="norm" value=" Start " onclick="startit()"> <input type="button" name="norm" value=" Stop " onclick="stopit()"> </td></tr> <tr> <td width=10><li><font color="#FFFFFF">.</td> <td width=50>I Am...</td> <td width=300 align=center><input type="text" name="yrs" size=20></td> <td width=100 align=left> ...Years Old</td> </tr> <tr> <td><li><font color="#FFFFFF">.</td> <td>Or...</td> <td align=center><input type="text" name="dys" size=20></td> <td align=left> ...Days Old</td> </tr> <tr> <td><li><font color="#FFFFFF">.</td> <td>Or...</td> <td align=center><input type="text" name="hrs" size=20></td> <td align=left> ...Hours Old</td> </tr> <tr> <td><li><font color="#FFFFFF">.</td> <td>Or...</td> <td align=center><input type="text" name="mins" size=20></td> <td align=left> ...Minutes Old</td> </tr> <tr> <td><li><font color="#FFFFFF">.</td> <td>Or...</td> <td align=center><input type="text" name="secs" size=20></td> <td align=left> ...Seconds Old</td> </tr> </table> </form> <p align="center"><font face="arial" size="-2">This free script provided by</font><br> <font face="arial, helvetica" size="-2"><a href="http://wsabstract.com">Website Abstraction</a></font></p>
مع خالص تحياتي
المـتـمــيــــز
عودة إلى الجافا
عودة إلى الصفحة الرئيسية