生成最新日期與時(shí)間選擇(年月日)下拉框
深山行者個(gè)人網(wǎng)站 2011/1/26 14:48:24 深山行者 字體:
大 中 小 瀏覽 19213
<%
Response.Write " <select size=""1"" name=""datYear"">"
For i = 2005 To Year(Date)
Response.Write "<option value=""" & i & """"
If i = Year(Date) Then
Response.Write " selected"
End If
Response.Write ">" & i & "</option>"
Next
Response.Write " </select> - "
Response.Write " <select size=""1"" name=""datMonth"">"
For i = 1 To 12
Response.Write "<option value=""" & i & """"
If i = Month(Date) Then
Response.Write " selected"
End If
Response.Write ">" & i & "</option>"
Next
Response.Write " </select> - "
Response.Write " <select size=""1"" name=""datDay"">"
For i = 1 To 31
Response.Write "<option value=""" & i & """"
If i = Day(Date) Then
Response.Write " selected"
End If
Response.Write ">" & i & "</option>"
Next
Response.Write " </select> "
%>
這個(gè)雖然沒(méi)有技術(shù)含量,但是在某些場(chǎng)合非常實(shí)用,這才是最關(guān)鍵的,生成最新日期與時(shí)間選擇(年月日)下拉框
主要用于管理中心,用戶選擇出生日期等一類的需要日期的地方。
- 相關(guān)閱讀
- ASP網(wǎng)站打開(kāi)特別卡 提示:msxml3.dll 錯(cuò)誤 '80072ee2' /LM/W3SVC/670931603/Root/global.asa解決辦法
- 四川省旅者旅行社有限公司總部
- 防止 IE 瀏覽器被黑的技巧十則
- javascript編寫的網(wǎng)頁(yè)版的打字測(cè)試程序
- 一個(gè)select表單移處數(shù)據(jù)的效果,非常好用。
- 根據(jù)頁(yè)面模板動(dòng)態(tài)生成html頁(yè)面
- 昆山假日旅行社
- 通過(guò)阿里云服務(wù)接口獲得ip地址詳細(xì)信息
- 共有0條關(guān)于《生成最新日期與時(shí)間選擇(年月日)下拉框》的評(píng)論
- 發(fā)表評(píng)論