用javascript实现日历,高手帮忙

来源:百度知道 编辑:UC知道 时间:2024/06/23 22:03:33
1、每年的1月1日、5月1日、10月1日用特别的方式显示;
2、当鼠标单击某天时,用alert函数显示出类似如下的信息“您好!今天是2008年4月1日,星期二”。
3、当天的日期要特别显示;
4、要求日历显示漂亮整洁;
另外,A)如何显示出每天的星座?
B)更多的节日如何显示?节日信息如何显示更加有利于浏览者?
谢谢大家!!
当鼠标单击某天时,用alert函数显示出类似如下的信息“您好!今天是2008年4月1日,星期二”和最后的补充两点也附上,嗯,有劳了~
拜托不要拿已有的答案粘贴到本主题帖下好吗?比如,z7075845同志。
谢谢!

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效|Linkweb.cn/Js|---一个很漂亮实用的日历</title>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
//创建一个数组,用于存放每个月的天数
function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11)
{
this[0] = m0;
this[1] = m1;
this[2] = m2;
this[3] = m3;
this[4] = m4;
this[5] = m5;
this[6] = m6;
this[7] = m7;
this[8] = m8;
this[9] = m9;
this[10] = m10;
this[11] = m11;
}
//实现月历
function calendar() {
var monthNames = "JanFebMarAprMayJunJulAugSepOctNovDec";
var today = new Date();
var thisDay;
var monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
year = today.getYear() +1900;
thisDay = today.getDate();
if (((year % 4 == 0) && (year % 100 != 0)) || (ye