渡//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
標題>
var c = new Calendar(" c");
document.write(c);
腳本>
頭>
身體>
function Calendar(objName)
{
this.style = {
borderColor : "#909eff", //边框颜色
headerBackColor : "#909EFF", //表头背景颜色
headerFontColor : "#ffffff", //表头字体颜色
bodyBarBackColor : "#f4f4f4", //日历标题背景色
bodyBarFontColor : "#000000", //日历标题字体色
bodyBackColor : "#ffffff", //日历背景色
bodyFontColor : "#000000", //日历字体色
bodyHolidayFontColor : "#ff0000", //假日字体色
watermarkColor : "#d4d4d4", //背景水印色
moreDayColor : "#cccccc"
};
this.showMoreDay = false; //是否显示上月和下月的日期
this.Obj = objName;
this.date = null;
this.mouseOffset = null;
this.dateInput = null;
this.timer = null;
};
Calendar.prototype.toString = function()
{
var str = this.getStyle();
str += '
\n';
str += '
';
str += this.getHeader();
str += this.getBody();
str += '
';
返回str;
};
Calendar.prototype.getStyle = function()
{
var str = 'n';
回傳str;
};
Calendarar .prototype.getHeader = function()
{
var str = 'n';
返回str;
};
Calendar.prototype.getBody = function()
{
var n = 0;
var str = this.getBodyBar();
str = '
n';
for(i = 0; i {
str = '';
for(j = 0; j {
str = ' | n';
}
str = '
';
}
str = '
n';
str = '
今天:' new Date ().toFormatString("yyyy年mm月dd日") ' |
;n';
返回str;
};
Calendar.prototype.getBodyBar = function()
{
var str = '
n';
var day = new Array('日','一','二','三','四','五', '六');
for(i = 0; i {
str = '' 天[i] ' | n' ;
}
str = '
';
回傳str;
}
Calendar.prototype.getYearMenu = 函數(年份)
{
var str = '