资源预览内容
第1页 / 共2页
第2页 / 共2页
亲,该文档总共2页全部预览完了,如果喜欢就下载吧!
资源描述
显示年月日,星期,早晚,时钟!-calendar = new Date();day = calendar.getDay();month = calendar.getMonth();date = calendar.getDate();year = calendar.getYear();if (year 100) year = 1900 + year;cent = parseInt(year/100);g = year % 19;k = parseInt(cent - 17)/25);i = (cent - parseInt(cent/4) - parseInt(cent - k)/3) + 19*g + 15) % 30;i = i - parseInt(i/28)*(1 - parseInt(i/28)*parseInt(29/(i+1)*parseInt(21-g)/11);j = (year + parseInt(year/4) + i + 2 - cent + parseInt(cent/4) % 7;l = i - j;emonth = 3 + parseInt(l + 40)/44);edate = l + 28 - 31*parseInt(emonth/4);emonth-;var dayname = new Array (星期日,星期一,星期二,星期三,星期四,星期五,星期 六);var monthname =new Array (1 月,2 月,3 月,4 月,5 月,6 月,7 月,8 月,9 月”,”10 月”,”11 月”,”12 月);document.write(+year + 年);document.write(monthnamemonth);document.write(date + 日+);document.write(daynameday+ +);/ January(1月份节日,以下同。)document.write();/-!-document.write();var now,hours,minutes,seconds,timeValue;function showtime()(now = new Date();hours = now.getHours();minutes = now.getMinutes();seconds = now.getSeconds();timeValue = (hours = 12) ? 下午”:上午;timeValue += (hours 12) ? hours - 12 : hours) + 点”;timeValue += (minutes 10)?0:) + minutes+ 分;timeValue += (seconds
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号