Effect Chart:
Demo Code:
<ptml> <pead> <meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "> <title> zodiac Search </title> <style type=" Text/css "> <!--td,body {font-size:12px} A: link {color: #000000; Text-decoration:none} a:visited {color: #000000; Text-decoration:none} a:active {color:blue; Text-decoration:none} a:hover {color:red;text-decoration:underline} a.title:link {color: #000000; text-decoration: Underline} a.title:visited {color: #000000; text-decoration:underline} a.title:active {color: #0000ff; text-decoration : underline} a.title:hover {color: #0000ff; text-decoration:underline}--> </style> <script language= Javascript> <!--function Getpet () {var toyear = 1997; var birthyear = Document.frm.inyear.value; var birthpet= "Ox" x = (toyear-birthyear)% if ((x = = 1) | | (x = = 11)) {birthpet= "mouse"} else {if (x = = 0) {birthpet= "ox"} else {if (x = = 11) | | (x = = 1)) {birthpet= "Tiger"} else {if (x = = 10) | | (x = = 2)){birthpet= "Rabbit"} else {if (x = = 9) | | (x = = 3)) {birthpet= "dragon"} else {if (x = = 8) | | (x = = 4)) {birthpet= "snake"} else {if (x = = 7) | | (x = = 5)) {birthpet= "horse"} else {if (x = = 6) | | (x = = 6)) {birthpet= "sheep"} else {if (x = = 5) | | (x = = 7)) {birthpet= "monkey"} else {if (x = = 4) | | (x = = 8)) {birthpet= "chicken"} else {if (x = = 3) | | (x = = 9)) {birthpet= "dog"} else {if (x = = 2) | | (x = = 10)) {birthpet= "Pig"}} }}}}}} Document.frm.birth.value = Birthpet; }//--> </SCRIPT> </pead> <table width= "760" height= "border=" "1" align= "center" cellpadding= "1" cellspacing= "0" bordercolor= "#aaaaaa" bordercolordark= "#ffffff" > <tbody> <tr> <td height= "Align" = "Center" ><table width= "100%" border= "0" > <tr> <td width= "54%" ><b><font color= "#424242 "><strong><font color=" #424242 > Current position >> Home ></font></strong></font> Practical Query > Zodiac CheckInquiry </b></td> <td width= "46%" > </td> </tr> </table></td> </tr> ;/tbody> </table> <table width= "760" border= "0" align= "center" cellspacing= "0" > <tr> <td width = "760" height= "ten" ></td> </tr> </table> <div align=center><span class= "Style2" > Zodiac Search </span></div> <p align=center> <form name=frm> <div align= "center" > Born in: < INPUT size=4 value=1986 name=inyear> year <input onclick=getpet () Type=button value= view Zodiac > : <input size=3 name=birth> </div> </FORM><TR> <td width= "1 00% "height=" 6 "align=" center "bgcolor=" #FFFFFF "><font color= #ff0000 > </TD> </TR> <tr > <TD align= "Center" height= "5" width= "100%" > </TD> </TR></P> <div align= "Center" & Gt;<span class= "Style1" > Of course no one ever forgetsWhat you belong to. But you can easily know the sign of the person who was born in any year. Enter the year in which the query was born, for example: "1986" </span> </div> <p> </p> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]