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")
posted @ 2011-06-25 11:03  edielei  阅读(304)  评论(0编辑  收藏  举报