Metachecker.net
|
FontsMadeEasy.com
|
RankChecker.net
Learn Java Script Today
|
Over 5000 Free Fonts
|
Tutorials
|
Javascript Forum
|
Other Javascript Resources
|
Cheat Sheet
JavaScript Basics
Inserting Javascript
Complete Tutorial
Advance DHTML Tutorial
Script archive
Advanced Tutorials
Alert Scripts
Animation
Audio
Background Effects
Banner Ads
Browser Window
Buttons
Button Forms
Calculcators
Calendars
Clocks & Dates
Cookies
Cursor Effects
DHMTL Games
DHTML Miscellaneous
Equivalents
Forms
Games
IE4+ Scripts
IE5+ Scripts
Image Effects
Image Miscellaneous
Links & Buttons
Math Related
Messages Miscellaneous
Miscellaneous
Mouse Tricks
Navigation
Page Details
Password Protection
Pulldown Menus
Random Stuff
Scrolling
Status Bar
Text Animation
User Detail
User Info
Window Control
Born Which Day?
I'm sure most of you are curious about what day of the week you were born. This script will tell you exactly that - in a nice layout, as well. Now, you know.
When were you born?
Month
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Day
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Insert into <HEAD>
<SCRIPT LANGUAGE="JavaScript"> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function calculate() { month = document.form.month.selectedIndex; month = document.form.month.options[month].value; day = document.form.day.selectedIndex; day = document.form.day.options[day].value; year = document.form.year.value; var oyear=year var dob = " "+ year +", "+month + ", "+day; var thenx = new Date(dob); var year=thenx.getYear(); if (year<100) year="19" + thenx.getYear(); else year=thenx.getYear(); if (year > 1969) wyear=year; else { if (oyear<1900) { if (oyear>1800) { wrelyear= (eval(oyear)-1801)%(28); wyear = wrelyear+1981; } else wyear = 1970 } else if (oyear>1900) {wrelyear= (eval(oyear)-1901)%(28); wyear= wrelyear+1985 } else if (oyear==1900) {wyear= 1990; } } var dob = " "+ wyear +", "+month + ", "+day; var thenx = new Date(dob); var theday = thenx.getDay()+1; var date=thenx.getDate(); var weekday = new Array(6); weekday[1]="Sunday"; weekday[2]="Monday"; weekday[3]="Tuesday"; weekday[4]="Wednesday"; weekday[5]="Thursday"; weekday[6]="Friday"; weekday[7]="Saturday"; if (day != date) alert("Sorry! That appears to be an invalid date!"+day+" ..."+date+"::"+oyear+"..."+year+" "+dob+"=="+wyear+".-.-"+thenx+" "+day+" "+month); else { dayborn = weekday[theday]; dob = dayborn + ", " + month + " " + date + ", " + oyear + "."; alert("You were born on " + dob); } } // End --> </script> </head>
Insert into <BODY>
<form name=form> <center> <table border=2 cellspacing=0 cellpadding=0 bgcolor=white> <tr><td colspan=3 align=center><font face="verdana, arial" size="-1">When were you born?</font></td></tr> <tr><td align=center> <select name="month"> <option value="" selected>Month <option value="January">Jan <option value="February">Feb <option value="March">Mar <option value="April">Apr <option value="May">May <option value="June">Jun <option value="July">Jul <option value="August">Aug <option value="September">Sep <option value="October">Oct <option value="November">Nov <option value="December">Dec </select> </td> <td align=center> <select name="day"> <option value="" selected>Day <option value="1">01 <option value="2">02 <option value="3">03 <option value="4">04 <option value="5">05 <option value="6">06 <option value="7">07 <option value="8">08 <option value="9">09 <option value="10">10 <option value="11">11 <option value="12">12 <option value="13">13 <option value="14">14 <option value="15">15 <option value="16">16 <option value="17">17 <option value="18">18 <option value="19">19 <option value="20">20 <option value="21">21 <option value="22">22 <option value="23">23 <option value="24">24 <option value="25">25 <option value="26">26 <option value="27">27 <option value="28">28 <option value="29">29 <option value="30">30 <option value="31">31 </select> </td> <td align=center> <input type=text name=year value="19" size=4 maxlength=4> </td></tr> </table><p> <input type=button value="Calculate" onClick="calculate()"> </center> </form>
Other Options