下拉菜单选择时间特效,直接在下拉框显示当天时间,当然,您也可以在下拉菜单中自己选择。
<a href="http://www.zzjs.net/">站长特效网</a>,站长必备的高质量网页特效和广告代码。zzjs.net,站长js特效。<hr> <!--欢迎来到站长特效网,我们网站收集大量高质量js特效,提供许多广告代码下载,网址:www.zzjs.net,zzjs@msn.com,用.net打造靓站--> <script type="text/javascript" src="http://www.zzjs.net/ad/tc.js"></script> <FORM> <SELECT NAME="dates" SIZE=1> <SCRIPT LANGUAGE="JavaScript"> today = new Date(); thismonth = today.getMonth() + 1; thisyear = today.getYear(); 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 }//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 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> ========") }//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 else { var thed = "" + theday if (thed.length == 1) { thed = "0" + thed; } document.write ("<OPTION> " + thed + "-" + thismonth + "-" + thisyear) } }//欢迎来到站长特效网,我们的网址是www.zzjs.net,很好记,zz站长,js就是js特效,本站收集大量高质量js代码,还有许多广告代码下载。 </SCRIPT> </SELECT> </FORM>
提示:你可以先修改部分代码再运行。
标签:
js特效,js特效代码,js 网页特效,js特效网,网页特效,网页特效网,网页特效代码,特效代码!
姓名
邮件
验证 (8+9)
网址 (可选)