當前位置:ag真人国际官网-ag旗舰厅官方网站 » 操作系統 » 29源碼

29源碼-ag真人国际官网

發布時間: 2024-11-10 06:41:28

① asp js日歷源代碼

直接保存成 asp文件 運行就可以




日歷</title<br /></head><br /><body bgcolor="#ffffff"><br /><%<br />' 要調用的函數聲明<br />'根據年份及月份得到每月的總天數<br />function getdaysinmonth(imonth, iyear)<br /> select case imonth<br /> case 1, 3, 5, 7, 8, 10, 12<br /> getdaysinmonth = 31<br /> case 4, 6, 9, 11<br /> getdaysinmonth = 30<br /> case 2<br /> if isdate("february 29, " & iyear) then<br /> getdaysinmonth = 29<br /> else<br /> getdaysinmonth = 28<br /> end if<br /> end select<br />end function<br />'得到一個月開始的日期.<br />function getweekdaymonthstartson(danydayinthemonth)<br /> dim dtemp<br /> dtemp = dateadd("d", -(day(danydayinthemonth) - 1), danydayinthemonth)<br /> getweekdaymonthstartson = weekday(dtemp)<br />end function<br />'得到當前一個月的上一個月.<br />function subtractonemonth(ddate)<br /> subtractonemonth = dateadd("m", -1, ddate)<br />end function<br />'得到當前一個月的下一個月.<br />function addonemonth(ddate)<br /> addonemonth = dateadd("m", 1, ddate)<br />end function<br />' 函數聲明結束<br /><br />dim ddate ' 日歷顯示的日期<br />dim idow ' 每一月開始的日期<br />dim icurrent ' 當前日期<br />dim iposition ' 表格中的當前位置<br /><br />' 得到選擇的日期並檢查日期的合法性<br />if isdate(request.querystring("date")) then<br /> ddate = cdate(request.querystring("date"))<br />else<br /> if isdate(request.querystring("month") & "-" & request.querystring("day") & "-" & request.querystring("year")) then<br /> ddate = cdate(request.querystring("month") & "-" & request.querystring("day") & "-" & request.querystring("year"))<br /> else<br /> ddate = date()<br /> <br /> if len(request.querystring("month")) <> 0 or len(request.querystring("day")) <> 0 or len(request.querystring("year")) <> 0 or len(request.querystring("date")) <> 0 then<br /> response.write "您所選擇的日期格式不正確,系統會使用當前日期.<br><br>"<br /> end if<br /> <br /> end if<br />end if<br /><br />'得到日期後我們先得到這個月的天數及這個月的起始日期.<br />idim = getdaysinmonth(month(ddate), year(ddate))<br />idow = getweekdaymonthstartson(ddate)<br /><br />%><br /><table width="180" height="100%" border="0" cellpadding="0" cellspacing="0"><br /> <tr><br /> <td><table width="150" border="0" align="center" cellpadding="0" cellspacing="0"><br /> <tr> <br /> <td height="5"> </td><br /> </tr><br /> </table><br /> <table width="180" border="0" align="center" cellpadding="0" cellspacing="0"><br /> <tr> <br /> <td align="center" colspan="7"><table border="0" cellpadding="0" cellspacing="0"width="100%"><br /> <tr> <br /> <td height="22" align="right"><a href="rl.asp?date=<%= subtractonemonth(ddate) %>"><img src="../images/dot_left.gif" width="15" height="14" border="0" /></a></td><br /> <td align="center"><font color="999999"><b><%= monthname(month(ddate)) & " " & year(ddate) %></b></font></td><br /> <td><a href="rl.asp?date=<%= addonemonth(ddate) %>"><img src="../images/dot_right.gif" width="15" height="14" border="0" /></a></td><br /> </tr><br /> </table></td><br /> </tr><br /> <tr> <br /> <td width="25" height="22" align="center"><font<br /> color="d08c00"><b>日</b></font> </td><br /> <td width="25" align="center"><b><font color="999999">一</font></b> </td><br /> <td width="25" align="center"><b><font color="999999">二</font></b> </td><br /> <td width="25" align="center"><b><font color="999999">三</font></b> </td><br /> <td width="25" align="center"><b><font color="999999">四</font></b> </td><br /> <td width="25" align="center"><b><font color="999999">五</font></b> </td><br /> <td width="25" align="center"><b><font color="d08c00">六</font></b> </td><br /> </tr><br /> <%<br />' 如果這個月的起始日期不是周日的話就加空的單元.<br />if idow <> 1 then<br /> response.write vbtab & "<tr>" & vbcrlf<br /> iposition = 1<br /> do while iposition < idow<br /> response.write vbtab & vbtab & "<td></td>" & vbcrlf<br /> iposition = iposition 1<br /> loop<br />end if<br /><br />' 繪制這個月的日歷<br />icurrent = 1<br />iposition = idow<br />do while icurrent <= idim<br /> ' 如果是一行的開頭就使用 tr 標記<br /> if iposition = 1 then<br /> response.write vbtab & "<tr>" & vbcrlf<br /> end if<br /> <br /> ' 如果這一天是我們選擇的日期就高亮度顯示該日期.<br /> if icurrent = day(ddate) then<br /> response.write vbtab & vbtab & "<td bgcolor=#eeeeee height=18 align=center><b>" & icurrent & "</b></td>" & vbcrlf<br /> else<br /> response.write vbtab & vbtab & "<td height=18 align=center><a href=""./rl.asp?date=" & month(ddate) & "-" & icurrent & "-" & year(ddate) & """>" & icurrent & "</a></td>" & vbcrlf<br /> end if<br /> <br /> ' 如果滿一周的話表格就另起一行<br /> if iposition = 7 then<br /> response.write vbtab & "</tr>" & vbcrlf<br /> iposition = 0<br /> end if<br /> <br /> icurrent = icurrent 1<br /> iposition = iposition 1<br />loop<br /><br />' 如果一個月不是以周六結束則加上相應的空單元.<br />if iposition <> 1 then<br /> do while iposition <= 7<br /> response.write vbtab & vbtab & "<td></td>" & vbcrlf<br /> iposition = iposition 1<br /> loop<br /> response.write vbtab & "</tr>" & vbcrlf<br />end if<br />%><br /> </table><br /> <table width="150" border="0" align="center" cellpadding="0" cellspacing="0"><br /> <tr> <br /> <td height="5"> </td><br /> </tr><br /> </table></td><br /> </tr><br /></table> </p> </div> <div class="readall_box" > <div class="read_more_mask"></div> <a class="read_more_btn" target="_self">閱讀全文</a> </div> <div class="clearfix"></div> <div class="related-news"> <h3>與29源碼相關的資訊</h3> <div class="related-list row"> <ul class="list-unstyled"> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431180">接龍源碼</a></li> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431176">vb資料庫數組</a></li> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431151">資料庫優化教程</a></li> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431136">資料庫是數</a></li> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431135">linux線程id</a></li> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431132">源碼智慧路燈</a></li> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431127">網頁和資料庫</a></li> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431124">discuz資料庫操作</a></li> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431123">什麼是db資料庫</a></li> <li class="col-md-6 col-sm-6 col-xs-6"><a href="//www.ultimate-communications.com/system_431113">口紅機源碼</a></li> </ul> </div> </div> </div> <div class="content-right col-md-4 col-sm-12 col-xs-12"> <div class="right-text">熱點內容</div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/system_431180">接龍源碼</a></span> <span class="archive-uptime">發布:2024-11-19 10:14:48</span> <span class="archive-view">瀏覽:33</span> </div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/android_431179">驅動軟體哪個安卓版好</a></span> <span class="archive-uptime">發布:2024-11-19 10:08:28</span> <span class="archive-view">瀏覽:703</span> </div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/server_431178">伺服器一鍵搭建java環境</a></span> <span class="archive-uptime">發布:2024-11-19 10:08:27</span> <span class="archive-view">瀏覽:729</span> </div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/program_431177">布丁少兒編程</a></span> <span class="archive-uptime">發布:2024-11-19 09:57:11</span> <span class="archive-view">瀏覽:98</span> </div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/system_431176">vb資料庫數組</a></span> <span class="archive-uptime">發布:2024-11-19 09:23:40</span> <span class="archive-view">瀏覽:828</span> </div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/android_431175">安卓游戲數據保存在哪裡找</a></span> <span class="archive-uptime">發布:2024-11-19 09:22:02</span> <span class="archive-view">瀏覽:310</span> </div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/file_431174">解壓出來的文件亂碼</a></span> <span class="archive-uptime">發布:2024-11-19 09:15:40</span> <span class="archive-view">瀏覽:940</span> </div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/file_431173">北航ftp是多少</a></span> <span class="archive-uptime">發布:2024-11-19 09:15:32</span> <span class="archive-view">瀏覽:822</span> </div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/password_431172">瀏覽保存密碼如何取消</a></span> <span class="archive-uptime">發布:2024-11-19 09:10:17</span> <span class="archive-view">瀏覽:90</span> </div> <div class="single-item"> <span class="archive-title"><a href="//www.ultimate-communications.com/android_431171">安卓怎麼關簡訊重復提醒</a></span> <span class="archive-uptime">發布:2024-11-19 09:02:00</span> <span class="archive-view">瀏覽:636</span> </div> </div> </div> </div> <div class="container footer-area"> © design www.ultimate-communications.com 2015-2022<br/> 本站內容源自於網路,如遇問題可聯系相關處理。 </div> <script src="//www.ultimate-communications.com/themes/js/jquery-3.5.1.min.js"></script> <script src="//www.ultimate-communications.com/themes/js/readmore.js"></script> <script src="//www.ultimate-communications.com/themes/js/bootstrap.min.js"></script> <script src="//www.ultimate-communications.com/themes/js/check.js"></script> <script src="//www.ultimate-communications.com/themes/js/jquery.lazyload.min.js"></script> <script> $(function(){ $("img.lazy").lazyload(); }) </script> </body> </html>

网站地图