纯ASP代码之公历转农历实现(含属相)--例子代码

80酷酷网    80kuku.com

  农历 

<!--#includeFile="clsDay.asp"-->
<%
DimobjChinaDay
DimsDay,sWeekDay,sChinaDay,sChinaYear,sChinaAni
SetobjChinaDay=New ChinaDay
CallobjChinaDay.Action("",sDay,sWeekDay,sChinaYear,sChinaDay,sChinaAni)
SetobjChinaDay=Nothing
'Response.WritesDay&"
"
'Response.WritesWeekDay&"
"
'Response.WritesChinaYear&"
"
'Response.WritesChinaDay&"
"
'Response.WritesChinaAni&"
"
%>
<html>
<head>
  <metahttp-equiv="Content-Type"content="text/html;charset=gb2312">
  <title>农历日历</title>
  <style>
    .itm{font-family:宋体;font-size:14px;}
    .chn{font-family:宋体;font-size:12px}
    .chnred{font-family:宋体;color:#FF0000;font-size:12px}
    .chnblue{font-family:宋体;color:#0000FF;font-size:12px}
  </style>
</head>

<bodybgcolor="#FFFFFF">
<!--显示站点日历-->
<tableborder="1"cellspacing="1"width="110"bgcolor="#EAEAEA"bordercolor="#FFFFFF"
bordercolorlight="#000000">
 <tr><td><center><table>
 <tr>
   <tdclass="chnblue"align="center"valign="middle"><%=sDay%>
</td>
 </tr>
 <tr>
   <tdclass="chnred"align="center"valign="middle"><%=sWeekDay%>
</td>
 </tr>
 <tr>
   <tdclass="chnblue"align="center"valign="middle"><%=sChinaYear&"("&sChinaAni&")"%>
</td>
 </tr>
 <tr>
   <tdclass="chnred"align="center"valign="middle"><%=sChinaDay%>
</td>
 </tr>
 </td>
 </tr>
 </table>
</table>
</body>
</html>

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: