日历Javascript [英] Calendar Javascript

查看:84
本文介绍了日历Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道这个日历javascript:
http://www.javascriptkit.com/script/script2/eventscalendar.shtml [ ^ ]

当今天的日期与黄色突出显示的日期相同时,是否可以使用绿色(今天的日期)和黄色(活动的)以外的其他颜色?

I was wondering about this calendar javascript:
http://www.javascriptkit.com/script/script2/eventscalendar.shtml[^]

When today''s date is the same as the yellow highlighted date, is it possible to have another color than the green (date today) and yellow (activity)?

推荐答案

在zip包中,您需要在142行上编辑html文件.下面粘贴在142行处的代码段应呈现您要查找的结果.

In the zip package you would need to edit the html file on line 142. The code snippet below pasted at line 142 should render the result you are looking for.

if ((todaysDay == x) && (todaysDate == daycounter) && (todaysMonth == monthNum)) {
	//add this if statement to check and see if it is an event today
    if (checkevents(daycounter,monthNum,yearNum,i,x))
    {
	// if true make the bgcolor what ever color you like other than green or yellow
	calendarString += ''<td align=\"center\" bgcolor=\"#9A45EE\" height=\"30\" width=\"40\"><a href=\"javascript:showevents('' + daycounter + '','' + monthNum + '','' + yearNum + '','' + i + '','' + x + '')\">'' + daycounter + ''<\/a><\/td>'';
    }
    else
    {
	calendarString += ''<td align=\"center\" bgcolor=\"#AAFFAA\" height=\"30\" width=\"40\"><a href=\"javascript:showevents('' + daycounter + '','' + monthNum + '','' + yearNum + '','' + i + '','' + x + '')\">'' + daycounter + ''<\/a><\/td>'';
    }
}
else	calendarString += ''<td align=\"center\" bgcolor=\"#FFFFC8\" height=\"30\" width=\"40\"><a href=\"javascript:showevents('' + daycounter + '','' + monthNum + '','' + yearNum + '','' + i + '','' + x + '')\">'' + daycounter + ''<\/a><\/td>'';
}


哇,像个护身符!
我真的很感激! :-D
Wow, works like a charm!
I am truly grateful! :-D


这篇关于日历Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆