By.KaBuS weB MaSteR
Mesaj Sayısı : 223 Kayıt tarihi : 13/06/09 Yaş : 31 Nerden : Notalar İcinden Lakap : By.KaBuS
| Konu: Hangi gün doğduğunu gör ! Ptsi Haz. 15, 2009 10:58 pm | |
| - Kod:
-
[color=#000080][i]<!-- START OF script -->[/i][/color] [color=#800000]<script LANGUAGE=[color=#0000ff]"Javascript"[/color]>[/color] [i][color=#000080]<!-- begin script
//General Array Function function MakeArray(n) { this.length = n; for (var i = 1; i <=n; i++) { this[i] = 0; } }
//Initialize Days of Week Array days = new MakeArray(7); days[0] = "Cumartesi" days[1] = "Pazar" days[2] = "Pazartesi" days[3] = "Sali" days[4] = "Carsamba" days[5] = "Persembe" days[6] = "Cuma"
//Initialize Months Array months = new MakeArray(12); months[1] = "Ocak" months[2] = "Subat" months[3] = "Mart" months[4] = "Nisan" months[5] = "Mayis" months[6] = "Haziran" months[7] = "Temmuz" months[8] = "Agustos" months[9] = "Eylul" months[10] = "Ekim" months[11] = "Kasim" months[12] = "Aralik"
//Day of Week Function function compute(form) { var val1 = parseInt(form.day.value, 10) if ((val1 < 0) || (val1 >[/color] 31)) { alert("1 ile 31 arasi bir tarih girin…") } var val2 = parseInt(form.month.value, 10) if ((val2 [color=#000080]< 0) || (val2 >[/color] 12)) { alert("1 ile 12 arasi bir tarih girin…") } var val2x = parseInt(form.month.value, 10) var val3 = parseInt(form.year.value, 10) if (val3 [color=#000080]< 1900) { alert("1900 ile 2050 arasi bir tarih girin…") } if (val2 == 1) { val2x = 13; val3 = val3-1 } if (val2 == 2) { val2x = 14; val3 = val3-1 } var val4 = parseInt(((val2x+1)*3)/5, 10) var val5 = parseInt(val3/4, 10) var val6 = parseInt(val3/100, 10) var val7 = parseInt(val3/400, 10) var val8 = val1+(val2x*2)+val4+val3+val5-val6+val7+2 var val9 = parseInt(val8/7, 10) var val0 = val8-(val9*7) form.result1.value = months[val2]+" "+form.day.value +", "+form.year.value form.result2.value = days[val0] }
// end script -->[/color][/i] [color=#800000]</script>[/color]
[color=#000080]<h3>[/color][color=#000080]<i>[/color]HANGİ GÜN DOĞDUN? [color=#000080]<i>[/color][color=#000080]</h3>[/color] [color=#000080]<b>[/color]
[color=#000080]<p>[/color][color=#000080]</b>[/color] Dogdugunuz tarihi yazın ve hesapla tusuna basin[color=#000080]</p>[/color]
[color=#ff8000]<form>[/color] [color=#000080]<p>[/color]Dogdugunuz ay(1-12): [color=#ff8000]<input TYPE=[color=#0000ff]"text"[/color] NAME=[color=#0000ff]"month"[/color] SIZE=[color=#0000ff]"2"[/color]>[/color] [color=#000080]</p>[/color] [color=#000080]<p>[/color]Dogdugunuz gun (1-31): [color=#ff8000]<input TYPE=[color=#0000ff]"text"[/color] NAME=[color=#0000ff]"day"[/color] SIZE=[color=#0000ff]"2"[/color]>[/color] [color=#000080]</p>[/color] [color=#000080]<p>[/color]Dogdugunuz yil(ornek:2007): [color=#ff8000]<input TYPE=[color=#0000ff]"text"[/color] NAME=[color=#0000ff]"year"[/color] SIZE=[color=#0000ff]"4"[/color]>[/color] [color=#000080]</p>[/color] [color=#000080]<p>[/color][color=#ff8000]<input TYPE=[color=#0000ff]"button"[/color] VALUE=[color=#0000ff]"Hesapla"[/color] ONCLICK=[color=#0000ff]"compute(this.form)"[/color]>[/color] [color=#ff8000]<input TYPE=[color=#0000ff]"reset"[/color] VALUE=[color=#0000ff]"Temizle"[/color]>[/color] [color=#000080]</p>[/color] [color=#000080]<p>[/color]Dogdugunuz tarih: [color=#ff8000]<input TYPE=[color=#0000ff]"text"[/color] NAME=[color=#0000ff]"result1"[/color] SIZE=[color=#0000ff]"18"[/color]>[/color] [color=#000080]</p>[/color] [color=#000080]<p>[/color]DOGDUGUNUZ GUN: [color=#ff8000]<input TYPE=[color=#0000ff]"text"[/color] NAME=[color=#0000ff]"result2"[/color] SIZE=[color=#0000ff]"20"[/color]>[/color] [color=#000080]</p>[/color] [color=#ff8000]</form>[/color] [color=#000080]<html>[/color]designed by okanka [color=#000080]</html>[/color]
[i][color=#000080]<!-- END OF script -->[/color][/i] | |
|