Programalama > JAVA SCRIPT

Etiketler: kadar, yasadin!

Ort. 0
Puan ver:
<html>
<head>

<b>Aşağıdaki Kutulara
                Bilebildiginiz Kadarı ile Doğum Senesi , Ay 
                ,Günü , Saati , Dakikası , Sn nizi yazınız
                ve Start Butonuna Basarak Detaylı Yaşınızı
                Öğrenin. Otomatiği Sectiğiniz Takdirde Zaman
                işlemeye devam edecektir. </b>

<br><br>
<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>


<form name="my_age">
<table width=460 border=0 cellspacing=0 cellpadding=2>
<tr>
<td align=center colspan=5>Sene  
<input name="birthy" type="text" size=4>  
Ay<input name="birthm" type="text" size=2>  
Gun<input name="birthd" type="text" size=2>  
Saat<input name="birthh" type="text" size=2>  
Dakika<input name="birthmin" type="text" size=2>  
Saniye<input name="births" type="text" size=2>  
</td>
</tr>
<tr>
<td align=center colspan=5>
Otomatik<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>DOGUM</td>
<td width=300 align=center><input type="text" name="yrs" size=20></td>
<td width=100 align=left>  Sene</td>
</tr>
<tr>
<td><li><font color="#FFFFFF">.</td>
<td>DOGUM</td>
<td align=center><input type="text" name="dys" size=20></td>
<td align=left>  Gun</td>
</tr>
<tr>
<td><li><font color="#FFFFFF">.</td>
<td>DOGUM</td>
<td align=center><input type="text" name="hrs" size=20></td>
<td align=left>  Saat</td>
</tr>
<tr>
<td><li><font color="#FFFFFF">.</td>
<td>DOGUM</td>
<td align=center><input type="text" name="mins" size=20></td>
<td align=left>  Dakika</td>
</tr>
<tr>
<td><li><font color="#FFFFFF">.</td>
<td>DOGUM</td>
<td align=center><input type="text" name="secs" size=20></td>
<td align=left>  Saniye</td>
</tr>
</table>
</form>

</body>
</html>


Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2024 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.