javascript 日历控件的问题
高手帮我看看 错在那里 给我修改一下下 万分感谢
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml ">
<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 " />
<title> 日历生成器 </title>
<script type= "text/javascript ">
function funGetDaysInMonth(theMonth,theYear)
{
var thePrevDate = new Date(theYear,theMonth,0);
return thePrevDate.getDate();
}
function funMakeCalendar(theYear,theMonth)
{
var myMonth = new Array();
myMonth[0] = new Array(7);
myMonth[1] = new Array(7);
myMonth[2] = new Array(7);
myMonth[3] = new Array(7);
myMonth[4] = new Array(7);
myMonth[5] = new Array(7);
myMonth[6] = new Array(7);
var CalendarDate = new Date(theYear,theMonth-1,1);
var iDayOfFirst = CalendarDate.getDay();
var iDaysInMonth = funGetDaysInMonth(theMonth,theYear);
var theDate = 1;
myMonth[0][0] = "Sun ";
myMonth[0][1] = "Mon ";
myMonth[0][2] = "Tue ";
myMonth[0][3] = "Wed ";
myMonth[0][4] = "Thu ";
myMonth[0][5] = "Fri ";
myMonth[0][6] = "Sat ";
for(var i=iDayOfFirst;i <7;i++)
{
myMonth[1][i] = theDate;
theDate++;
}
for(var i=2;i <7;i++)
{
for(var j=0;j <7;j++)
{
if(theDate <= iDaysInMonth)
{
myMonth[i][j] = theDate;
theDate++;
}
}
}
return myMonth;
}
function funDrawCalendar(theYear,theMonth)
{
var myMonth = funMakeCalendar(theYear,theMonth);
document.write( " <table border = '0 '> ");
document.write( " <tr> ");
document.write( " <td align = 'center '> + myMonth[0][0] + </td> ");
document.write( " <td align = 'center '> + myMonth[0][1] + </td> ");
document.write( " <td align = 'center '> + myMonth[0][2] + </td> ");
document.write( " <td align = 'center '> + myMonth[0][3] + </td> ");
document.write( " <td align = 'center '> + myMonth[0][4] + </td> ");
document.write( " <td align = 'center '> + myMonth[0][5] + </td> ");
document.write( " <td align = 'center '> + myMonth[0][6] + </td> ");
document.write( " </tr> ");
for(var i=