下拉菜单选择时间特效,直接在下拉框显示当天时间,当然,您也可以在下拉菜单中自己选择。
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <FORM> <SELECT NAME="dates" SIZE=1> <SCRIPT LANGUAGE="JavaScript"> today = new Date(); thismonth = today.getMonth() + 1; thisyear = today.getYear()+1900; thisday = today.getDate(); maxdays=31;//default // months with 30 days if (thismonth==4 || thismonth==6 || thismonth==9 || thismonth==11) { maxdays=30 } // february, leap year if (thismonth==2) { // feb if ((thisyear/4)!=parseInt(thisyear/4)) { maxdays=28 }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) else { //leap year maxdays=29 } } thismonth = "" + thismonth if (thismonth.length == 1) { thismonth = "0" + thismonth; } for (var theday = 0; theday <= maxdays; theday++) { if (theday == 0) { document.write ("<OPTION SELECTED> "+ thisday + "-" + thismonth + "-" + thisyear ) document.write ("<OPTION> ========") }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) else { var thed = "" + theday if (thed.length == 1) { thed = "0" + thed; } document.write ("<OPTION> " + thed + "-" + thismonth + "-" + thisyear) } }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) </SCRIPT> </SELECT> </FORM>
本文来自武鸣人网站,转载请注明出处