关于JAVA脚本,请高手指教!
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>
星座计算
</title>
</head>
<body>
<table width="860" height="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/b_tensi2.jpg">
<script language="javascript">
<!-- begin
function signs() {
var start=1901,birthyear=document.frml.year.value, date=document.frml.date.value, month=document.frml.month.selectedIndex;
with (document.frml.sign){
if (month == 1 && date >=20 || month == 2 && date <=18)
{value = "水瓶座";}
if (month == 1 && date > 31 ){value = "???";}
if (month == 2 && date >=19 || month == 3 && date <=20)
{value = "双鱼座";}
if (month == 2 && date > 29 ){value = "Say what ?";}
if (month == 3 && date >=21 || month == 4 && date <=19)
{value = "白羊座";}
if (month == 3 && date > 31 ){value = "Ok. Whatever.";}
if (month == 4 && date >=20 || month == 5 && date <=20)
{value = "金牛座";}
if (month == 4 && date > 30 ){value = "I'm sooo sorry !";}
if (month == 5 && date >=21 || month == 6 && date <=21)
{value = "双子座";}
if (month == 5 && date > 31 ){value = "Umm . . . no.";}
if (month == 6 && date >=22 || month == 7 && date <=22)
{value = "巨蟹座";}
if (month == 6 && date > 30 ){value = "Sorry.";}
if (month == 7 && date >=23 || month == 8 && date <=22)
{value = "狮子座";}
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 = "天平座";}
if (month == 9 && date > 30 ){value = "Try Again.";}
if (month == 10 && date >=23 || month == 11 && date <=21)
{value = "天蝎座";}
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 = "摩羯座";}
if (month == 12 && date > 31 ){value = "No way";}
}
x = (start - birthyear) % 12
with (document.frml.csign){
if (x == 1 || x == -11) {value = "鼠";}
if (x == 0) {value = "牛";}
if (x == 11 || x == -1) {value = "虎";}
if (x == 10 || x == -2) {value = "兔";}
if (x == 9 || x == -3) {value = "龙";}
if (x == 8 || x == -4) {value = "蛇";}
if (x == 7 || x == -5) {value = "马";}
if (x == 6 || x == -6) {value = "羊";}
if (x == 5 || x == -7) {value = "猴";}
if (x == 4 || x == -8) {value = "鸡";}
if (x == 3 || x == -9) {value = "狗";}
if (x == 2 || x == -10) {value = "猪";}
}
}
// end -->
</script>
<from name="frml">
<center>
<table rules="none" cellspacing="0" cellpadding="5" border="1" bordercolor="lime">
<tr>
<td><b><i>出生年份</i></b></td>
<td><div align="right">
<input type="text" size="10" name="year" value="出生年份" onClick=value=""></div>
</td>
<td><!--This empty field is just for appearance--></td>
</tr>
<tr>
<td><b><i>出生月份</i></b></td>
<td><div align="right">
<select name="month">
<option value="x">----</option>
<option value="1">一月</option>
<option value="2">二月</option>
<option value="3">三月</option>
<option value="4">四月</option>
<option value="5">五月</option>
<option value="6">六月</option>
<option value="7">七月</option>
<option value="8">八月</option>
<option value="9">九月</option>
<option value="10">十月</option>
<option value="11">十一月</option>
<option value="12">十二月</option>
</select></div></td>
</tr>
<tr>
<td><b><i>日期</i></b></td>
<td><div align="right">
<input type="text" name="date" value="天" size="3" onClick=value="">
</td>
</tr>
<tr>
<td>
<input type="button" value="得出结果" onClick="signs()"></div>
</td>
</tr>
<tr>
<td><b><i>星座</i></b></td>
<td><div align="right">
<input type="text" name="sign" size="12" value="" align="right"></div>
</td></tr>
<tr>
<td><b><i>属相</i></b></td>
<td><div align="right">
<input type="text" name="csign" size="12"></div>
</td></tr>
</table>
</center>
</from>
</td>
</tr>
</table>
</body>
</html>
补充:我想用这段代码实现输入生日计算出生肖和星座,但是不知道那里错了,计算不出来。
追问:我的代码有误,可以帮忙改一下吗?谢谢了。我是刚开始自己学的