ASP 计算出指定年份生肖

Function Zodiac(ByVal s)

 If s > 0 Then

  Dim ZodiacList

  ZodiacList = Array("猴", "鸡", "狗", "猪", "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊")

  Zodiac = ZodiacList(s Mod 12)

 End If

End Function



'使用方法:

Response.Write Zodiac("2011")

你可能感兴趣的:(asp)