悬赏园豆:20
[已解决问题]
解决于 2008-08-25 12:35
<PRE id=line33> 。。。<PRE id=line26> <<SPAN class=start-tag>tr</SPAN><SPAN class=attribute-name> align</SPAN>=<SPAN class=attribute-value>"center"</SPAN>>
<<SPAN class=start-tag>td</SPAN>>
<<SPAN class=start-tag>span</SPAN><SPAN class=attribute-name> id</SPAN>=<SPAN class=attribute-value>"layerCalender"</SPAN>></<SPAN class=end-tag>span</SPAN>>
</PRE><PRE id=line33> </<SPAN class=end-tag>td</SPAN>>
</<SPAN class=end-tag>tr</SPAN>>
。。。</PRE></PRE><PRE><<SPAN class=start-tag>script</SPAN><SPAN class=attribute-name> language</SPAN>=<SPAN class=attribute-value>"javascript" </SPAN><SPAN class=attribute-name>type</SPAN>=<SPAN class=attribute-value>"text/javascript"</SPAN>>
<!--
var dayArray=new Array("日","一","二","三","四","五","六");
var monthArray=[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var stringTable="<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" style=\"align:center;border-color:#8F8FAF;height:100%\" width=\"100%\"><tr style=\"background-color:#ffffff;align:center\">";
for (var i=0; i<dayArray.length; ++i)
{
stringTable+="<td class=\"tdclass\"><font color=\"#993333\"><b>"+dayArray[i]+"</b></font></td>";
}
stringTable+="</tr>";
function setValue(tag, str)
{
document.getElementById(tag).innerHTML=str;
}
function showTime()
{
var today=new Date();
var currentYear=today.getFullYear()
if (((currentYear%4==0)&&(currentYear%100!=0))||(currentYear%400==0))
monthArray[1]=29;
var allDays=monthArray[today.getMonth()];
var currentWeek=today.getDay();
var currentDay=today.getDate();
var i=currentDay%7-currentWeek;
var threshold=(7+i)%7;
var isEnd=false;
var stringAll=stringTable;
while (true) {
if (isEnd) {
stringAll+="<td class=\"tdclass\" style=\"background-color:#EEEEEE\"> </td>";
if (i % 7==(threshold+6)%7) {
stringAll+="</tr>";
break;
}
} else {
if (i % 7==threshold)
stringAll+="<tr style=\"align:center\">";
stringAll+=i>0?"<td class=\"tdclass\""+(i==currentDay?" style=\"background-color:#FEA477;color: #FFFFFF\"":"")+"><b>"+i+"</b></td>":"<td class=\"tdclass\" style=\"background-color:#EEEEEE\"> </td>";
if (i % 7==(threshold+6)%7) {
stringAll+="</tr>";
if (i==allDays)
break;
}
if (i==allDays)
isEnd=true;
}
++i;
}
stringAll+="</table>";
setValue("layerYear", currentYear);
setValue("layerMonth", today.getMonth()+1);
setValue("layerDay", currentDay);
setValue("layerWeek", dayArray[currentWeek]);
setValue("layerCalendar", stringAll);
}
showTime()
// -->
</<SPAN class=end-tag>script</SPAN>>
请问“layerCalender”对象为什么得不到呢?</PRE>