Copy codeThe Code is as follows:
<Script language = "JavaScript">
<! -- Begin
Function signs (){
Var start = 1901, birthyear = document. zodiac. year. value, date = document. zodiac. date. value, month = document. zodiac. month. selectedIndex;
With (document. zodiac. sign ){
If (month = 1 & date> = 20 | month = 2 & date <= 18) {value = "Aquarius ";}
If (month = 1 & date> 31) {value = "Huh? ";}
If (month = 2 & date> = 19 | month = 3 & date <= 20) {value = "Pisces ";}
If (month = 2 & date> 29) {value = "Say what? ";}
If (month = 3 & date> = 21 | month = 4 & date <= 19) {value = "Aries ";}
If (month = 3 & date> 31) {value = "OK. Whatever .";}
If (month = 4 & date> = 20 | month = 5 & date <= 20) {value = "Taurus ";}
If (month = 4 & date> 30) {value = "I'm soooo sorry! ";}
If (month = 5 & date> = 21 | month = 6 & date <= 21) {value = "Gemini ";}
If (month = 5 & date> 31) {value = "Umm... no .";}
If (month = 6 & date> = 22 | month = 7 & date <= 22) {value = "cancer ";}
If (month = 6 & date> 30) {value = "Sorry .";}
If (month = 7 & date> = 23 | month = 8 & date <= 22) {value = "Leo ";}
If (month = 7 & date> 31) {value = "Excuse me? ";}
If (month = 8 & date> = 23 | month = 9 & date <= 22) {value = "";}
If (month = 8 & date> 31) {value = "Yeah. Right .";}
If (month = 9 & date> = 23 | month = 10 & date <= 22) {value = "Libra ";}
If (month = 9 & date> 30) {value = "Try Again .";}
If (month = 10 & date> = 23 | month = 11 & date <= 21) {value = "scorpio ";}
If (month = 10 & date> 31) {value = "Forget it! ";}
If (month = 11 & date> = 22 | month = 12 & date <= 21) {value = "";}
If (month = 11 & date> 30) {value = "Invalid Date ";}
If (month = 12 & date> = 22 | month = 1 & date <= 19) {value = "Capricorn ";}
If (month = 12 & date> 31) {value = "No way! ";}
}
X = (start-birthyear) % 12
With (document. zodiac. csign ){
If (x = 1 | x =-11) {value = "rat ";}
If (x = 0) {value = "";}
If (x = 11 | x =-1) {value = "tiger ";}
If (x = 10 | x =-2) {value = "rabbit ";}
If (x = 9 | x =-3) {value = "dragon ";}
If (x = 8 | x =-4) {value = "snake ";}
If (x = 7 | x =-5) {value = "horse ";}
If (x = 6 | x =-6) {value = "goat ";}
If (x = 5 | x =-7) {value = "monkey ";}
If (x = 4 | x =-8) {value = "chicken ";}
If (x = 3 | x =-9) {value = "dog ";}
If (x = 2 | x =-10) {value = "pig ";}
}
}
// End -->
</Script>
<Form name = "zodiac">
<Center>
<Table bgcolor = "# eeaa00" border = "2" bordercolor = "#000000" rules = "none" cellspacing = "0" cellpadding = "4">
<Tr> <td> <B> <I> Year of birth </I> </B> </td>
<Td> <div align = "right"> <input type = "text" size = "10" name = "year" value = "year of birth" onClick = value = ""> </div> </td>
<Td> <! -- This empty field is just for appearance --> </td>
<Tr> <td> <B> <I> month of birth </I> </B> </td>
<Td> <div align = "right">
<Select name = "month">
<Option value = "x"> select a month </option>
<Option value = "1"> January </option> <option value = "2"> February </option> <option value = "3"> March </option>
<Option value = "4"> April </option> <option value = "5"> May </option> <option value = "6"> June </option>
<Option value = "7"> July </option> <option value = "8"> August </option> <option value = "9"> September </option>
<Option value = "10"> December October </option> <option value = "11"> December November </option>
<Option value = "12"> December </option> </select> </div> </td>
<Td> <! -- This empty field is just for appearance --> </td> </tr>
<Tr> <td> <B> <I> day </I> </B> </td>
<Td> <div align = "right"> <input type = "text" name = "date" value = "day" size = "3" onClick = value = "> </td>
<Td> <input type = "button" value = "Calculate" onClick = "signs ()"> </div> </td> </tr>
<Tr> <td> <B> <I> constellation: </I> </B> </td>
<Td> <div align = "right"> <input type = "text" name = "sign" size = "12" value = "" align = "right"> </ div> </td> </tr>
<Td> <! -- This empty field is just for appearance --> </td> </tr>
<Tr> <td> <B> <I> kinship: </I> </B> </td>
<Td> <div align = "right"> <input type = "text" name = "csign" size = "12"> </div> </td>
<Td> <! -- This empty field is just for appearance --> </td> </tr>
</Table>
</Center>
</Form>