»
EnglishFrenchVietnamese

Print - Get a day - JavaScriptBank.com

Full version: jsB@nk » Time » Clock » Get a day
URL: https://www.javascriptbank.com/get-a-day.html

Get a day © JavaScriptBank.comSelect box to get the day.

Full version: jsB@nk » Time » Clock » Get a day
URL: https://www.javascriptbank.com/get-a-day.html



JavaScript
<SCRIPT>function get(){if (a.value == "April" && b.value == "30"){ alert ("April doesn't have a 31 for the date") }else if (a.value == "June" && b.value == "30"){ alert ("June doesn't have a 31 for the date") }else if (a.value == "September" && b.value == "30"){ alert ("Setpember doesn't have a 31 for the date") }else if (a.value == "November" && b.value == "30"){ alert ("November doesn't have a 31 for the date") }else if (a.value == "February" && b.value == "30"){ alert ("February doesn't have a 31 for the date") }else if (a.value == "February" && b.value == "29"){ alert ("February doesn't have a 30 for the date") }else{var birth = new Date(a.value + " " + b.value + ", " + c.value) ;var day = birth.getDay() ;if (day == 0){ day = "Sunday" }if (day == 1){ day = "Monday" }if (day == 2){ day = "Tuesday" }if (day == 3){ day = "Wednesday" }if (day == 4){ day = "Thursday" }if (day == 5){ day = "Friday" }if (day == 6){ day = "Saturday" }alert (day) }}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<U><B>Month<SELECT name=a> <OPTION   value=January selected>January<OPTION value=February>February<OPTION   value=March>March<OPTION value=April>April<OPTION value=May>May<OPTION   value=June>June<OPTION value=July>July<OPTION value=August>August<OPTION   value=September>September<OPTION value=October>October<OPTION   value=November>November<OPTION value=December>December</OPTION></SELECT><BR>Day&nbsp;&nbsp;&nbsp;&nbsp;<SELECT name=b> <OPTION value=1 selected>1<OPTION value=2>2<OPTION value=3>3<OPTION   value=4>4<OPTION value=5>5<OPTION value=6>6<OPTION value=7>7<OPTION   value=8>8<OPTION value=9>9<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</OPTION></SELECT><BR>Year&nbsp;&nbsp;&nbsp;<SELECT name=c> <OPTION   value=2002 selected>2002<OPTION value=2001>2001<OPTION value=2000>2000<OPTION   value=1999>1999<OPTION value=1998>1998<OPTION value=1997>1997<OPTION   value=1996>1996<OPTION value=1995>1995<OPTION value=1994>1994<OPTION   value=1993>1993<OPTION value=1992>1992<OPTION value=1991>1991<OPTION   value=1990>1990<OPTION value=1989>1989<OPTION value=1988>1988<OPTION   value=1987>1987<OPTION value=1986>1986<OPTION value=1985>1985<OPTION   value=1984>1984<OPTION value=1983>1983<OPTION value=1982>1982<OPTION   value=1981>1981<OPTION value=1980>1980<OPTION value=1979>1979<OPTION   value=1978>1978<OPTION value=1977>1977<OPTION value=1976>1976<OPTION   value=1975>1975<OPTION value=1974>1974<OPTION value=1973>1973<OPTION   value=1972>1972<OPTION value=1971>1971<OPTION value=1970>1970<OPTION   value=1969>1969<OPTION value=1968>1968<OPTION value=1967>1967<OPTION   value=1966>1966<OPTION value=1965>1965<OPTION value=1964>1964<OPTION   value=1963>1963<OPTION value=1962>1962<OPTION value=1961>1961<OPTION   value=1960>1960<OPTION value=1959>1959<OPTION value=1958>1958<OPTION   value=1957>1957<OPTION value=1956>1956<OPTION value=1955>1955<OPTION   value=1954>1954<OPTION value=1953>1953<OPTION value=1952>1952<OPTION   value=1951>1951<OPTION value=1950>1950<OPTION value=1949>1949<OPTION   value=1948>1948<OPTION value=1947>1947<OPTION value=1946>1946<OPTION   value=1945>1945<OPTION value=1944>1944<OPTION value=1943>1943<OPTION   value=1942>1942<OPTION value=1941>1941<OPTION value=1940>1940<OPTION   value=1939>1939<OPTION value=1938>1938<OPTION value=1937>1937<OPTION   value=1936>1936<OPTION value=1935>1935<OPTION value=1934>1934<OPTION   value=1933>1933<OPTION value=1932>1932<OPTION value=1931>1931<OPTION   value=1930>1930<OPTION value=1929>1929<OPTION value=1928>1928<OPTION   value=1927>1927<OPTION value=1926>1926<OPTION value=1925>1925<OPTION   value=1924>1924<OPTION value=1923>1923<OPTION value=1922>1922<OPTION   value=1921>1921<OPTION value=1920>1920<OPTION value=1919>1919<OPTION   value=1918>1918<OPTION value=1917>1917<OPTION value=1916>1916<OPTION   value=1915>1915<OPTION value=1914>1914<OPTION value=1913>1913<OPTION   value=1912>1912<OPTION value=1911>1911<OPTION value=1910>1910<OPTION   value=1909>1909<OPTION value=1908>1908<OPTION value=1907>1907<OPTION   value=1906>1906<OPTION value=1905>1905<OPTION value=1904>1904<OPTION   value=1903>1903<OPTION value=1902>1902<OPTION value=1901>1901</OPTION></SELECT> <BR><BR><INPUT onclick=get() type=button value="Get the Day"><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->