javascript html实现网页版日历代码__第1页
javascript html实现网页版日历代码__第2页
javascript html实现网页版日历代码__第3页
javascript html实现网页版日历代码__第4页
javascript html实现网页版日历代码__第5页
免费预览已结束,剩余1页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、javascript html实现网页版日历代码_ 本文实例为大家分享了网页版日历代码,供大家参考,具体内容如下 效果图: 实现代码: html head link rel=stylesheet type=text/css href=Skin.css style !- table text-align: center - /style /head body div align=center script language=javascript var my = new Date(); function showc() var k=1; var j=1; var today; var tomon

2、th; var theday=1;/日期 var max; var temp; var tempday;/这个月第一天的星期 document.write (b + my.getFullYear() + - + (my.getMonth()+1) + /b); document.write (table border=1 width=273 height=158); document.write (tr); document.write (td height=23 width=39font color=redSun/font/td); document.write (td height=23

3、width=39Mon/td); document.write (td height=23 width=39Tue/td); document.write (td height=23 width=39Wed/td); document.write (td height=23 width=39Thu/td); document.write (td height=23 width=39Fri/td); document.write (td height=23 width=39Sat/td); document.write (/tr); temp=my.getDate(); my.setDate(1

4、); /document.write (my.getDate(); tempday=my.getDay();/返回第一天是星期几 my.setDate(temp); today=my.getDay();/返回现在星期几 switch (my.getMonth()+1) case 1: case 3: case 5: case 7: case 8: case 10: case 12: max=31; break; case 4: case 6: case 9: case 11: max=30; break; default: max=29;/这里没有考虑闰月! /document.write (

5、max); for(k=0;k6;k+) document.write (tr); for(j=0;j=6;j+) document.write (td height=23 width=39); if(j=(tempday) tempday=0;/设置为最小,相当于取消推断条件 if(theday=max) document.write (a title= + my.getFullYear() + - + (my.getMonth()+1) + - +theday + target=_blank href=detail.asp?date= + theday + ); if(theday=my.getDate() document.write (font color=green + theday + /font/a); else if(j=0) document.write (font color=red + theday + /font/a); else document.write (theday + /a); theday+; document.write (/td); document.write (/tr)

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论