English
<html> <head> <script language="JavaScript"> //Use JS to calculate your bra size website building academy http://www.downcodes.com function jisuan() { if (document.form1.up.value== '') { alert ('Please enter the upper bust size:'); return false; } if (document.form1.up.value=='') { alert ('Please enter the lower bust size:') ; return false; } var answer=document.form1.up.value-document.form1.under.value; yushu=document.form1.under.value%10; if (yushu < 5) yushu = 0; if (yushu > = 5) yushu = 5; chima='Your bra size is:'+(Math.floor(document.form1.under.value/10)*10+yushu/1); if (answer <= 10) chima= chima+'A'; else if (answer <=14 && answer >=11) chima=chima+'B'; else if (answer <=19 && answer >=14) chima=chima+'C'; else chima=chima+' D'; alert (chima); } </script> </head> <body> <form name="form1" method="post"> Please fill in the upper bust size: <input name="up" type=" text" size="8"> CM <br>Please fill in the under bust size: <input name="under" type="text" size="8"> CM <br> <input type="submit" name= "Submit" value="Calculation" onclick="jisuan();"> <input type="reset" name="Submit2" value="Refill"> </form> </body> </html>