以下代码为WAP2.0的查询:
<%
Set XML=Server.CreateObject("QuickWAP.XML")
XML.SiteTitle="中国被爱可以在线"
XML.XhtmlHeader
'以下为文件正文,利用ASP函数的部分。
XML.WriteOut "<h2>农历查询</h2>"If Request("ToDo")="ToAdd" Then
Receive_A=Request("Send_A") '
If Receive_A="" Then
ErrorMessage="请输入日期。"
End If
'以下为文件正文。
If ErrorMessage<>"" Then
XML.WriteRow ErrorMessage
Else
XML.WriteOut Receive_A & "是:" & XML.LunarDate(Receive_A) & " " & XML.QueryWeek(Receive_A)
End If
End If
XML.WriteOut "<form method='post' action='" & XML.ThisFileName & "'>"
XML.WriteOut "<h3>输入日期:</h3>"
XML.WriteOut "<input type='text' name='Send_A' value='" & date() & "'/>"
XML.WriteRow "<input type='hidden' name='ToDo' value='ToAdd'/>"
XML.WriteOut "<input type='submit' value='提交'/>"
XML.WriteOut "</form>"'以下为返回链接等
XML.WriteOut XML.Div(,,"N")
XML.WriteRow XML.ImgA("","Index.asp","返回上级")
'以下为返回链接等信息。
XML.WriteRow XML.A("",XML.WapPath,"返回首页")
XML.XhtmlFooter
Set XML=Nothing
%>
效果预览如下:
以下代码为WAP1.2的查询:
<%
Set WAP=Server.CreateObject("QuickWAP.WAP")
WAP.CardTitle="中国被爱可以在线"
WAP.PageHeader
'以下为文件正文,利用ASP函数的部分。
WAP.WriteRow "<b>农历查询</b>"
If Request("ToDo")="ToAdd" Then
Receive_A=Request("Send_A") '
If Receive_A="" Then
ErrorMessage="请输入日期。"
End If
'以下为文件正文。
If ErrorMessage<>"" Then
WAP.WriteRow ErrorMessage
Else
WAP.WriteRow Receive_A & "是:" & WAP.LunarDate(Receive_A) & " " & WAP.QueryWeek(Receive_A)
End If
End If
WAP.WriteRow WAP.TextIn("","text","Send_A",Date(),"输入日期")
WAP.WriteRow WAP.AnchorGo("提交",WAP.ThisFileName & "?ToDo=ToAdd","Send_A","Send_A"," ","post")
'以下为返回链接等信息。
WAP.WriteRow WAP.BackA("返回上页")
WAP.WriteRow WAP.ImgA("",WAP.WapPath,"返回首页")
WAP.WriteRow WAP.DoGo(WAP.WapPath, "option", "回首页")
WAP.WriteRow WAP.DoPrev("prev", "后退", "ToBack")
WAP.PageFooter
Set WAP=Nothing
%>
效果预览如下:
感谢 bicyle 的投稿