查看完整版本: javascript日历控件以及使用方法

php 2007-9-10 09:00

javascript日历控件以及使用方法

效果图:



[align=left][img]http://blog.chinaunix.net/upfile/070907131517.jpg[/img][/align]
[align=left]calendar.js[/align]
[font=新宋体][color=#ff9900]//now date

[/color][color=#0000ff]function[/color] getNowDate[color=#0000cc]([/color][color=#0000cc])[/color]
[color=#0000cc]{[/color]
   [color=#0000ff]var[/color] nn[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
   year1[color=#0000cc]=[/color]nn[color=#0000cc].[/color][color=#ff0000]getYear[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
   mon1[color=#0000cc]=[/color]nn[color=#0000cc].[/color][color=#ff0000]getMonth[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc]+[/color]1[color=#0000cc];[/color]
   date1[color=#0000cc]=[/color]nn[color=#0000cc].[/color][color=#ff0000]getDate[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#0000ff]var[/color] monstr1[color=#0000cc];[/color]
   [color=#0000ff]var[/color] datestr1
   [color=#0000ff]if[/color][color=#0000cc]([/color]mon1[color=#0000cc]<[/color]10[color=#0000cc])[/color]
    monstr1[color=#0000cc]=[/color][color=#ff00ff]"0"[/color][color=#0000cc]+[/color]mon1[color=#0000cc];[/color]
   [color=#0000ff]else[/color]
    monstr1[color=#0000cc]=[/color][color=#ff00ff]""[/color][color=#0000cc]+[/color]mon1[color=#0000cc];[/color]
     
   [color=#0000ff]if[/color][color=#0000cc]([/color]date1[color=#0000cc]<[/color]10[color=#0000cc])[/color]
     datestr1[color=#0000cc]=[/color][color=#ff00ff]"0"[/color][color=#0000cc]+[/color]date1[color=#0000cc];[/color]
   [color=#0000ff]else[/color]
     datestr1[color=#0000cc]=[/color][color=#ff00ff]""[/color][color=#0000cc]+[/color]date1[color=#0000cc];[/color]
   [color=#0000ff]return[/color] year1[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]monstr1[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]datestr1[color=#0000cc];[/color]
[color=#0000cc]}[/color]
[/font][font=新宋体][color=#ff9900]//last date
[/color]
[color=#0000ff]function[/color] getlastweekDate[color=#0000cc]([/color][color=#0000cc])[/color]
[color=#0000cc]{[/color]
   [color=#0000ff]var[/color] nn[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
   year1[color=#0000cc]=[/color]nn[color=#0000cc].[/color][color=#ff0000]getYear[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
   mon1[color=#0000cc]=[/color]nn[color=#0000cc].[/color][color=#ff0000]getMonth[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc]+[/color]1[color=#0000cc];[/color]
   date1[color=#0000cc]=[/color]nn[color=#0000cc].[/color][color=#ff0000]getDate[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
   
   [color=#0000ff]var[/color] mm[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color]year1[color=#0000cc],[/color]mon1[color=#0000cc]-[/color]1[color=#0000cc],[/color]date1[color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#0000ff]var[/color] tmp1[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color]2000[color=#0000cc],[/color]1[color=#0000cc],[/color]1[color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#0000ff]var[/color] tmp2[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color]2000[color=#0000cc],[/color]1[color=#0000cc],[/color]15[color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#0000ff]var[/color] ne[color=#0000cc]=[/color]tmp2[color=#0000cc]-[/color]tmp1[color=#0000cc];[/color]
   [color=#0000ff]var[/color] mm2[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
   mm2[color=#0000cc].[/color][color=#ff0000]setTime[/color][color=#0000cc]([/color]mm[color=#0000cc].[/color][color=#ff0000]getTime[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc]-[/color]ne[color=#0000cc])[/color][color=#0000cc];[/color]
   
   
   year2[color=#0000cc]=[/color]mm2[color=#0000cc].[/color][color=#ff0000]getYear[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
   mon2[color=#0000cc]=[/color]mm2[color=#0000cc].[/color][color=#ff0000]getMonth[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc]+[/color]1[color=#0000cc];[/color]
   date2[color=#0000cc]=[/color]mm2[color=#0000cc].[/color][color=#ff0000]getDate[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
   
   
     [color=#0000ff]if[/color][color=#0000cc]([/color]mon2[color=#0000cc]<[/color]10[color=#0000cc])[/color]
    monstr2[color=#0000cc]=[/color][color=#ff00ff]"0"[/color][color=#0000cc]+[/color]mon2[color=#0000cc];[/color]
   [color=#0000ff]else[/color]
    monstr2[color=#0000cc]=[/color][color=#ff00ff]""[/color][color=#0000cc]+[/color]mon2[color=#0000cc];[/color]
     
   [color=#0000ff]if[/color][color=#0000cc]([/color]date2[color=#0000cc]<[/color]10[color=#0000cc])[/color]
     datestr2[color=#0000cc]=[/color][color=#ff00ff]"0"[/color][color=#0000cc]+[/color]date2[color=#0000cc];[/color]
   [color=#0000ff]else[/color]
     datestr2[color=#0000cc]=[/color][color=#ff00ff]""[/color][color=#0000cc]+[/color]date2[color=#0000cc];[/color]

   
    [color=#0000ff]return[/color] year2[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]monstr2[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]datestr2[color=#0000cc];[/color]
[color=#0000cc]}[/color]



[color=#0000ff]var[/color] gdCtrl [color=#0000cc]=[/color] [color=#0000ff]new[/color] [color=#ff0000]Object[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] goSelectTag [color=#0000cc]=[/color] [color=#0000ff]new[/color] [color=#ff0000]Array[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] gcGray [color=#0000cc]=[/color] [color=#ff00ff]"#808080"[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] gcToggle [color=#0000cc]=[/color] [color=#ff00ff]"#FB8664"[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] gcBG [color=#0000cc]=[/color] [color=#ff00ff]"#e5e6ec"[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] previousObject [color=#0000cc]=[/color] [color=#0000ff]null[/color][color=#0000cc];[/color]

[color=#0000ff]var[/color] gdCurDate [color=#0000cc]=[/color] [color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] giYear [color=#0000cc]=[/color] gdCurDate[color=#0000cc].[/color][color=#ff0000]getFullYear[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] giMonth [color=#0000cc]=[/color] gdCurDate[color=#0000cc].[/color][color=#ff0000]getMonth[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc]+[/color]1[color=#0000cc];[/color]
[color=#0000ff]var[/color] giDay [color=#0000cc]=[/color] gdCurDate[color=#0000cc].[/color][color=#ff0000]getDate[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]

[color=#0000ff]function[/color] fSetDate[color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMonth[color=#0000cc],[/color] iDay[color=#0000cc])[/color][color=#0000cc]{[/color]
[color=#0000ff]var[/color] VicPopCal [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'VicPopCal'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  VicPopCal[color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc].[/color][color=#ff0000]visibility[/color] [color=#0000cc]=[/color] [color=#ff00ff]"hidden"[/color][color=#0000cc];[/color]
  [color=#0000ff]if[/color] [color=#0000cc]([/color][color=#0000cc]([/color]iYear [color=#0000cc]=[/color][color=#0000cc]=[/color] 0[color=#0000cc])[/color] [color=#0000cc]&[/color][color=#0000cc]&[/color] [color=#0000cc]([/color]iMonth [color=#0000cc]=[/color][color=#0000cc]=[/color] 0[color=#0000cc])[/color] [color=#0000cc]&[/color][color=#0000cc]&[/color] [color=#0000cc]([/color]iDay [color=#0000cc]=[/color][color=#0000cc]=[/color] 0[color=#0000cc])[/color][color=#0000cc])[/color][color=#0000cc]{[/color]
   gdCtrl[color=#0000cc].[/color][color=#ff0000]value[/color] [color=#0000cc]=[/color] [color=#ff00ff]""[/color][color=#0000cc];[/color]
  [color=#0000cc]}[/color][color=#0000ff]else[/color][color=#0000cc]{[/color]
   iMonth [color=#0000cc]=[/color] iMonth [color=#0000cc]+[/color] 100 [color=#0000cc]+[/color] [color=#ff00ff]""[/color][color=#0000cc];[/color]
   iMonth [color=#0000cc]=[/color] iMonth[color=#0000cc].[/color][color=#ff0000]substring[/color][color=#0000cc]([/color]1[color=#0000cc])[/color][color=#0000cc];[/color]
iDay [color=#0000cc]=[/color] iDay [color=#0000cc]+[/color] 100 [color=#0000cc]+[/color] [color=#ff00ff]""[/color][color=#0000cc];[/color]
  iDay [color=#0000cc]=[/color] iDay[color=#0000cc].[/color][color=#ff0000]substring[/color][color=#0000cc]([/color]1[color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#0000ff]if[/color][color=#0000cc]([/color]gdCtrl[color=#0000cc].[/color][color=#ff0000]tagName[/color] [color=#0000cc]=[/color][color=#0000cc]=[/color] [color=#ff00ff]"INPUT"[/color][color=#0000cc])[/color][color=#0000cc]{[/color]
      gdCtrl[color=#0000cc].[/color][color=#ff0000]value[/color] [color=#0000cc]=[/color] iYear[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]iMonth[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]iDay[color=#0000cc];[/color]
   [color=#0000cc]}[/color][color=#0000ff]else[/color][color=#0000cc]{[/color]
      gdCtrl[color=#0000cc].[/color][color=#ff0000]innerText[/color] [color=#0000cc]=[/color] iYear[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]iMonth[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]iDay[color=#0000cc];[/color]
   [color=#0000cc]}[/color]
  [color=#0000cc]}[/color]

  [color=#0000ff]for[/color] [color=#0000cc]([/color]i [color=#0000ff]in[/color] goSelectTag[color=#0000cc])[/color]
   goSelectTag[color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc].[/color][color=#ff0000]visibility[/color] [color=#0000cc]=[/color] [color=#ff00ff]"visible"[/color][color=#0000cc];[/color]
  goSelectTag[color=#0000cc].[/color][color=#ff0000]length[/color] [color=#0000cc]=[/color] 0[color=#0000cc];[/color]
  
  [color=#ff0000]window[/color][color=#0000cc].[/color][color=#ff0000]returnValue[/color][color=#0000cc]=[/color]gdCtrl[color=#0000cc].[/color][color=#ff0000]value[/color][color=#0000cc];[/color]
  [/font][font=新宋体][color=#ff9900]//window.close();
[/color]

[color=#0000cc]}[/color]

[color=#0000ff]function[/color] HiddenDiv[color=#0000cc]([/color][color=#0000cc])[/color]
[color=#0000cc]{[/color]
[color=#0000ff]var[/color] VicPopCal [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'VicPopCal'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] i[color=#0000cc];[/color]
  VicPopCal[color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc].[/color][color=#ff0000]visibility[/color] [color=#0000cc]=[/color] [color=#ff00ff]"hidden"[/color][color=#0000cc];[/color]
  [color=#0000ff]for[/color] [color=#0000cc]([/color]i [color=#0000ff]in[/color] goSelectTag[color=#0000cc])[/color]
   goSelectTag[color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc].[/color][color=#ff0000]visibility[/color] [color=#0000cc]=[/color] [color=#ff00ff]"visible"[/color][color=#0000cc];[/color]
  goSelectTag[color=#0000cc].[/color][color=#ff0000]length[/color] [color=#0000cc]=[/color] 0[color=#0000cc];[/color]

[color=#0000cc]}[/color]
[color=#0000ff]function[/color] fSetSelected[color=#0000cc]([/color]aCell[color=#0000cc])[/color][color=#0000cc]{[/color]
[color=#0000ff]var[/color] tbSelMonth1 [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelMonth'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] tbSelYear1 [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelYear'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] iOffset [color=#0000cc]=[/color] 0[color=#0000cc];[/color]
  [color=#0000ff]var[/color] iYear [color=#0000cc]=[/color] [color=#ff0000]parseInt[/color][color=#0000cc]([/color]tbSelYear1[color=#0000cc].[/color][color=#ff0000]value[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] iMonth [color=#0000cc]=[/color] [color=#ff0000]parseInt[/color][color=#0000cc]([/color]tbSelMonth1[color=#0000cc].[/color][color=#ff0000]value[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  
  aCell[color=#0000cc].[/color][color=#ff0000]bgColor[/color] [color=#0000cc]=[/color] gcBG[color=#0000cc];[/color]

[/font][font=新宋体][color=#ff9900]// with (aCell.children["cellText"]){
[/color]
  [color=#0000ff]with[/color] [color=#0000cc]([/color]aCell[color=#0000cc].[/color][color=#ff0000]childNodes[/color][color=#0000cc][[/color]0[color=#0000cc]][/color][color=#0000cc])[/color][color=#0000cc]{[/color]
   [color=#0000ff]var[/color] iDay [color=#0000cc]=[/color] [color=#ff0000]parseInt[/color][color=#0000cc]([/color][color=#ff0000]innerHTML[/color][color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#0000ff]if[/color] [color=#0000cc]([/color][color=#ff0000]color[/color][color=#0000cc]=[/color][color=#0000cc]=[/color]gcGray[color=#0000cc])[/color]
  iOffset [color=#0000cc]=[/color] [color=#0000cc]([/color]Victor[color=#0000cc]<[/color]10[color=#0000cc])[/color][color=#0000cc]?[/color][color=#0000cc]-[/color]1[color=#0000cc]:[/color]1[color=#0000cc];[/color]
iMonth [color=#0000cc]+[/color][color=#0000cc]=[/color] iOffset[color=#0000cc];[/color]
[color=#0000ff]if[/color] [color=#0000cc]([/color]iMonth[color=#0000cc]<[/color]1[color=#0000cc])[/color] [color=#0000cc]{[/color]
  iYear[color=#0000cc]-[/color][color=#0000cc]-[/color][color=#0000cc];[/color]
  iMonth [color=#0000cc]=[/color] 12[color=#0000cc];[/color]
[color=#0000cc]}[/color][color=#0000ff]else[/color] [color=#0000ff]if[/color] [color=#0000cc]([/color]iMonth[color=#0000cc]>[/color]12[color=#0000cc])[/color][color=#0000cc]{[/color]
  iYear[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc];[/color]
  iMonth [color=#0000cc]=[/color] 1[color=#0000cc];[/color]
[color=#0000cc]}[/color]
  [color=#0000cc]}[/color]
  fSetDate[color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMonth[color=#0000cc],[/color] iDay[color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000cc]}[/color]

[color=#0000ff]function[/color] Point[color=#0000cc]([/color]iX[color=#0000cc],[/color] iY[color=#0000cc])[/color][color=#0000cc]{[/color]
[color=#0000ff]this[/color][color=#0000cc].[/color][color=#ff0000]x[/color] [color=#0000cc]=[/color] iX[color=#0000cc];[/color]
[color=#0000ff]this[/color][color=#0000cc].[/color][color=#ff0000]y[/color] [color=#0000cc]=[/color] iY[color=#0000cc];[/color]
[color=#0000cc]}[/color]

[color=#0000ff]function[/color] fBuildCal[color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMonth[color=#0000cc])[/color] [color=#0000cc]{[/color]
  [color=#0000ff]var[/color] aMonth[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Array[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]for[/color][color=#0000cc]([/color]i[color=#0000cc]=[/color]1[color=#0000cc];[/color]i[color=#0000cc]<[/color]7[color=#0000cc];[/color]i[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
   aMonth[color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Array[/color][color=#0000cc]([/color]i[color=#0000cc])[/color][color=#0000cc];[/color]
   
  [color=#0000ff]var[/color] dCalDate[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMonth[color=#0000cc]-[/color]1[color=#0000cc],[/color] 1[color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] iDayOfFirst[color=#0000cc]=[/color]dCalDate[color=#0000cc].[/color][color=#ff0000]getDay[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] iDaysInMonth[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMonth[color=#0000cc],[/color] 0[color=#0000cc])[/color][color=#0000cc].[/color][color=#ff0000]getDate[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] iOffsetLast[color=#0000cc]=[/color][color=#0000ff]new[/color] [color=#ff0000]Date[/color][color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMonth[color=#0000cc]-[/color]1[color=#0000cc],[/color] 0[color=#0000cc])[/color][color=#0000cc].[/color][color=#ff0000]getDate[/color][color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc]-[/color]iDayOfFirst[color=#0000cc]+[/color]1[color=#0000cc];[/color]
  [color=#0000ff]var[/color] iDate [color=#0000cc]=[/color] 1[color=#0000cc];[/color]
  [color=#0000ff]var[/color] iNext [color=#0000cc]=[/color] 1[color=#0000cc];[/color]

  [color=#0000ff]for[/color] [color=#0000cc]([/color]d [color=#0000cc]=[/color] 0[color=#0000cc];[/color] d [color=#0000cc]<[/color] 7[color=#0000cc];[/color] d[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
aMonth[color=#0000cc][[/color]1[color=#0000cc]][/color][color=#0000cc][[/color]d[color=#0000cc]][/color] [color=#0000cc]=[/color] [color=#0000cc]([/color]d[color=#0000cc]<[/color]iDayOfFirst[color=#0000cc])[/color][color=#0000cc]?[/color][color=#0000cc]-[/color][color=#0000cc]([/color]iOffsetLast[color=#0000cc]+[/color]d[color=#0000cc])[/color][color=#0000cc]:[/color]iDate[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc];[/color]
  [color=#0000ff]for[/color] [color=#0000cc]([/color]w [color=#0000cc]=[/color] 2[color=#0000cc];[/color] w [color=#0000cc]<[/color] 7[color=#0000cc];[/color] w[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
   [color=#0000ff]for[/color] [color=#0000cc]([/color]d [color=#0000cc]=[/color] 0[color=#0000cc];[/color] d [color=#0000cc]<[/color] 7[color=#0000cc];[/color] d[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
  aMonth[color=#0000cc][[/color]w[color=#0000cc]][/color][color=#0000cc][[/color]d[color=#0000cc]][/color] [color=#0000cc]=[/color] [color=#0000cc]([/color]iDate[color=#0000cc]<[/color][color=#0000cc]=[/color]iDaysInMonth[color=#0000cc])[/color][color=#0000cc]?[/color]iDate[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc]:[/color][color=#0000cc]-[/color][color=#0000cc]([/color]iNext[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]return[/color] aMonth[color=#0000cc];[/color]
[color=#0000cc]}[/color]

[color=#0000ff]function[/color] fDrawCal[color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMonth[color=#0000cc],[/color] iCellHeight[color=#0000cc],[/color] sDateTextSize[color=#0000cc])[/color] [color=#0000cc]{[/color]
  [/font][font=新宋体][color=#ff9900]//var WeekDay = new Array("S","M","T","W","T","W","S");
[/color]
  [color=#0000ff]var[/color] WeekDay [color=#0000cc]=[/color] [color=#0000ff]new[/color] [color=#ff0000]Array[/color][color=#0000cc]([/color][color=#ff00ff]"日"[/color][color=#0000cc],[/color][color=#ff00ff]"一"[/color][color=#0000cc],[/color][color=#ff00ff]"二"[/color][color=#0000cc],[/color][color=#ff00ff]"三"[/color][color=#0000cc],[/color][color=#ff00ff]"四"[/color][color=#0000cc],[/color][color=#ff00ff]"五"[/color][color=#0000cc],[/color][color=#ff00ff]"六"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] styleTD [color=#0000cc]=[/color] [color=#ff00ff]" bgcolor='"[/color][color=#0000cc]+[/color]gcBG[color=#0000cc]+[/color][color=#ff00ff]"' bordercolor='"[/color][color=#0000cc]+[/color]gcBG[color=#0000cc]+[/color][color=#ff00ff]"' valign='middle' align='center' height='"[/color][color=#0000cc]+[/color]iCellHeight[color=#0000cc]+[/color][color=#ff00ff]"' style='font:bold arial "[/color][color=#0000cc]+[/color]sDateTextSize[color=#0000cc]+[/color][color=#ff00ff]";"[/color][color=#0000cc];[/color] [/font][font=新宋体][color=#ff9900]//Coded by Hcy email:hcy110@263.net
[/color]

  [color=#0000ff]with[/color] [color=#0000cc]([/color][color=#ff0000]document[/color][color=#0000cc])[/color] [color=#0000cc]{[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<tr>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]for[/color][color=#0000cc]([/color]i[color=#0000cc]=[/color]0[color=#0000cc];[/color] i[color=#0000cc]<[/color]7[color=#0000cc];[/color] i[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color][color=#0000cc]{[/color]
  [color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<td "[/color][color=#0000cc]+[/color]styleTD[color=#0000cc]+[/color][color=#ff00ff]"color:maroon' >"[/color][color=#0000cc]+[/color] WeekDay[color=#0000cc][[/color]i[color=#0000cc]][/color] [color=#0000cc]+[/color] [color=#ff00ff]"</td>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000cc]}[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</tr>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]

   [color=#0000ff]for[/color] [color=#0000cc]([/color]w [color=#0000cc]=[/color] 1[color=#0000cc];[/color] w [color=#0000cc]<[/color] 7[color=#0000cc];[/color] w[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color] [color=#0000cc]{[/color]
  [color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<tr>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]for[/color] [color=#0000cc]([/color]d [color=#0000cc]=[/color] 0[color=#0000cc];[/color] d [color=#0000cc]<[/color] 7[color=#0000cc];[/color] d[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color] [color=#0000cc]{[/color]
   [color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<td id='calCell' "[/color][color=#0000cc]+[/color]styleTD[color=#0000cc]+[/color][color=#ff00ff]"cursor:pointer;' onMouseOver='this.bgColor=gcToggle' onMouseOut='this.bgColor=gcBG' onclick='fSetSelected(this)'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<font id='cellText' name='cellText' Victor='Hcy_Flag'> </font>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</td>"[/color][color=#0000cc])[/color]
  [color=#0000cc]}[/color]
  [color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</tr>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000cc]}[/color]
  [color=#0000cc]}[/color]
[color=#0000cc]}[/color]

[color=#0000ff]function[/color] fUpdateCal[color=#0000cc]([/color][color=#0000cc])[/color] [color=#0000cc]{[/color]

iYear [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelYear'[/color][color=#0000cc])[/color][color=#0000cc].[/color][color=#ff0000]value[/color][color=#0000cc];[/color]
iMonth [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelMonth'[/color][color=#0000cc])[/color][color=#0000cc].[/color][color=#ff0000]value[/color][color=#0000cc];[/color]
  myMonth [color=#0000cc]=[/color] fBuildCal[color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMonth[color=#0000cc])[/color][color=#0000cc];[/color]
  
  [color=#0000ff]var[/color] cellText [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color]getElementsByName[color=#0000cc]([/color][color=#ff00ff]'cellText'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] i [color=#0000cc]=[/color] 0[color=#0000cc];[/color]
  [color=#0000ff]for[/color] [color=#0000cc]([/color]w [color=#0000cc]=[/color] 0[color=#0000cc];[/color] w [color=#0000cc]<[/color] 6[color=#0000cc];[/color] w[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
[color=#0000ff]for[/color] [color=#0000cc]([/color]d [color=#0000cc]=[/color] 0[color=#0000cc];[/color] d [color=#0000cc]<[/color] 7[color=#0000cc];[/color] d[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
  [color=#0000ff]with[/color] [color=#0000cc]([/color]cellText[color=#0000cc][[/color][color=#0000cc]([/color]7[color=#0000cc]*[/color]w[color=#0000cc])[/color][color=#0000cc]+[/color]d[color=#0000cc]][/color][color=#0000cc])[/color] [color=#0000cc]{[/color]
   Victor [color=#0000cc]=[/color] i[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc];[/color]
   [color=#0000ff]if[/color] [color=#0000cc]([/color]myMonth[color=#0000cc][[/color]w[color=#0000cc]+[/color]1[color=#0000cc]][/color][color=#0000cc][[/color]d[color=#0000cc]][/color][color=#0000cc]<[/color]0[color=#0000cc])[/color] [color=#0000cc]{[/color]
    [color=#ff0000]color[/color] [color=#0000cc]=[/color] gcGray[color=#0000cc];[/color]
    [color=#ff0000]innerHTML[/color] [color=#0000cc]=[/color] [color=#0000cc]-[/color]myMonth[color=#0000cc][[/color]w[color=#0000cc]+[/color]1[color=#0000cc]][/color][color=#0000cc][[/color]d[color=#0000cc]][/color][color=#0000cc];[/color]
   [color=#0000cc]}[/color][color=#0000ff]else[/color][color=#0000cc]{[/color]
    [color=#ff0000]color[/color] [color=#0000cc]=[/color] [color=#0000cc]([/color][color=#0000cc]([/color]d[color=#0000cc]=[/color][color=#0000cc]=[/color]0[color=#0000cc])[/color][color=#0000cc]|[/color][color=#0000cc]|[/color][color=#0000cc]([/color]d[color=#0000cc]=[/color][color=#0000cc]=[/color]6[color=#0000cc])[/color][color=#0000cc])[/color][color=#0000cc]?[/color][color=#ff00ff]"red"[/color][color=#0000cc]:[/color][color=#ff00ff]"black"[/color][color=#0000cc];[/color]
    [color=#ff0000]innerHTML[/color] [color=#0000cc]=[/color] myMonth[color=#0000cc][[/color]w[color=#0000cc]+[/color]1[color=#0000cc]][/color][color=#0000cc][[/color]d[color=#0000cc]][/color][color=#0000cc];[/color]
   [color=#0000cc]}[/color]
  [color=#0000cc]}[/color]
  
[color=#0000cc]}[/color]

[color=#0000ff]function[/color] fSetYearMon[color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMon[color=#0000cc])[/color][color=#0000cc]{[/color]
  [color=#0000ff]var[/color] tbSelMonth [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelMonth'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  tbSelMonth[color=#0000cc].[/color][color=#ff0000]options[/color][color=#0000cc][[/color]iMon[color=#0000cc]-[/color]1[color=#0000cc]][/color][color=#0000cc].[/color][color=#ff0000]selected[/color] [color=#0000cc]=[/color] [color=#0000ff]true[/color][color=#0000cc];[/color]

  [color=#0000ff]var[/color] tbSelYear [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelYear'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]for[/color] [color=#0000cc]([/color]i [color=#0000cc]=[/color] 0[color=#0000cc];[/color] i [color=#0000cc]<[/color] tbSelYear[color=#0000cc].[/color][color=#ff0000]length[/color][color=#0000cc];[/color] i[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
[color=#0000ff]if[/color] [color=#0000cc]([/color]tbSelYear[color=#0000cc].[/color][color=#ff0000]options[/color][color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc].[/color][color=#ff0000]value[/color] [color=#0000cc]=[/color][color=#0000cc]=[/color] iYear[color=#0000cc])[/color]
  tbSelYear[color=#0000cc].[/color][color=#ff0000]options[/color][color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc].[/color][color=#ff0000]selected[/color] [color=#0000cc]=[/color] [color=#0000ff]true[/color][color=#0000cc];[/color]

  fUpdateCal[color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMon[color=#0000cc])[/color][color=#0000cc];[/color]
  
[color=#0000cc]}[/color]

[color=#0000ff]function[/color] fPrevMonth[color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc]{[/color]
[color=#0000ff]var[/color] tbSelYear [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelYear'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] tbSelMonth [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelMonth'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] iMon [color=#0000cc]=[/color] tbSelMonth[color=#0000cc].[/color][color=#ff0000]value[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] iYear [color=#0000cc]=[/color] tbSelYear[color=#0000cc].[/color][color=#ff0000]value[/color][color=#0000cc];[/color]
  
  [color=#0000ff]if[/color] [color=#0000cc]([/color][color=#0000cc]-[/color][color=#0000cc]-[/color]iMon[color=#0000cc]<[/color]1[color=#0000cc])[/color] [color=#0000cc]{[/color]
   iMon [color=#0000cc]=[/color] 12[color=#0000cc];[/color]
   iYear[color=#0000cc]-[/color][color=#0000cc]-[/color][color=#0000cc];[/color]
  [color=#0000cc]}[/color]
  
  fSetYearMon[color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMon[color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000cc]}[/color]

[color=#0000ff]function[/color] fNextMonth[color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc]{[/color]
[color=#0000ff]var[/color] tbSelMonth [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelMonth'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] tbSelYear [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'tbSelYear'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] iMon [color=#0000cc]=[/color] tbSelMonth[color=#0000cc].[/color][color=#ff0000]value[/color][color=#0000cc];[/color]
  [color=#0000ff]var[/color] iYear [color=#0000cc]=[/color] tbSelYear[color=#0000cc].[/color][color=#ff0000]value[/color][color=#0000cc];[/color]
  
  [color=#0000ff]if[/color] [color=#0000cc]([/color][color=#0000cc]+[/color][color=#0000cc]+[/color]iMon[color=#0000cc]>[/color]12[color=#0000cc])[/color] [color=#0000cc]{[/color]
   iMon [color=#0000cc]=[/color] 1[color=#0000cc];[/color]
   iYear[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc];[/color]
  [color=#0000cc]}[/color]
  
  fSetYearMon[color=#0000cc]([/color]iYear[color=#0000cc],[/color] iMon[color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000cc]}[/color]

[color=#0000ff]function[/color] fToggleTags[color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc]{[/color]
[color=#0000ff]var[/color] [color=#ff0000]select[/color] [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementsByTagName[/color][color=#0000cc]([/color][color=#ff00ff]"SELECT"[/color][color=#0000cc])[/color][color=#0000cc];[/color]

[color=#0000ff]var[/color] isIE4 [color=#0000cc]=[/color] [color=#0000cc]([/color][color=#0000cc]([/color][color=#ff0000]navigator[/color][color=#0000cc].[/color][color=#ff0000]userAgent[/color][color=#0000cc].[/color][color=#ff0000]indexOf[/color][color=#0000cc]([/color][color=#ff00ff]'Win'[/color][color=#0000cc])[/color] [color=#0000cc]![/color][color=#0000cc]=[/color] [color=#0000cc]-[/color]1[color=#0000cc])[/color] [color=#0000cc]&[/color][color=#0000cc]&[/color] [color=#0000cc]([/color][color=#ff0000]navigator[/color][color=#0000cc].[/color][color=#ff0000]userAgent[/color][color=#0000cc].[/color][color=#ff0000]indexOf[/color][color=#0000cc]([/color][color=#ff00ff]'MSIE'[/color][color=#0000cc])[/color] [color=#0000cc]![/color][color=#0000cc]=[/color] [color=#0000cc]-[/color]1[color=#0000cc])[/color] [color=#0000cc]&[/color][color=#0000cc]&[/color] [color=#0000cc]([/color][color=#ff0000]parseInt[/color][color=#0000cc]([/color][color=#ff0000]navigator[/color][color=#0000cc].[/color][color=#ff0000]appVersion[/color][color=#0000cc])[/color] [color=#0000cc]>[/color][color=#0000cc]=[/color] 4 [color=#0000cc])[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]if[/color] [color=#0000cc]([/color]isIE4[color=#0000cc])[/color]
[color=#0000cc]{[/color]
[color=#0000ff]for[/color] [color=#0000cc]([/color]i[color=#0000cc]=[/color]0[color=#0000cc];[/color] i[color=#0000cc]<[/color][color=#ff0000]select[/color][color=#0000cc].[/color][color=#ff0000]length[/color][color=#0000cc];[/color] i[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
    [color=#0000ff]if[/color] [color=#0000cc]([/color][color=#0000cc]([/color][color=#ff0000]select[/color][color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc].[/color]Victor [color=#0000cc]![/color][color=#0000cc]=[/color] [color=#ff00ff]'Won'[/color][color=#0000cc])[/color] [color=#0000cc]&[/color][color=#0000cc]&[/color] fTagInBound[color=#0000cc]([/color][color=#ff0000]select[/color][color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc])[/color][color=#0000cc])[/color][color=#0000cc]{[/color]
     [color=#ff0000]select[/color][color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc].[/color][color=#ff0000]visibility[/color] [color=#0000cc]=[/color] [color=#ff00ff]"hidden"[/color][color=#0000cc];[/color]
     goSelectTag[color=#0000cc][[/color]goSelectTag[color=#0000cc].[/color][color=#ff0000]length[/color][color=#0000cc]][/color] [color=#0000cc]=[/color] [color=#ff0000]select[/color][color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc];[/color]
    [color=#0000cc]}[/color]

[color=#0000ff]with[/color] [color=#0000cc]([/color][color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]all[/color][color=#0000cc].[/color][color=#ff0000]tags[/color][color=#0000cc]([/color][color=#ff00ff]"SELECT"[/color][color=#0000cc])[/color][color=#0000cc])[/color][color=#0000cc]{[/color]
   [color=#0000ff]for[/color] [color=#0000cc]([/color]i[color=#0000cc]=[/color]0[color=#0000cc];[/color] i[color=#0000cc]<[/color][color=#ff0000]length[/color][color=#0000cc];[/color] i[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
    [color=#0000ff]if[/color] [color=#0000cc]([/color][color=#0000cc]([/color][color=#ff0000]item[/color][color=#0000cc]([/color]i[color=#0000cc])[/color][color=#0000cc].[/color][color=#ff00ff]Victor!="Won"[/color][color=#0000cc])[/color][color=#0000cc]&[/color][color=#0000cc]&[/color]fTagInBound[color=#0000cc]([/color][color=#ff0000]item[/color][color=#0000cc]([/color]i[color=#0000cc])[/color][color=#0000cc])[/color][color=#0000cc])[/color][color=#0000cc]{[/color]
     [color=#ff0000]item[/color][color=#0000cc]([/color]i[color=#0000cc])[/color][color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc].[/color][color=#ff0000]visibility[/color] [color=#0000cc]=[/color] [color=#ff00ff]"hidden"[/color][color=#0000cc];[/color]
     goSelectTag[color=#0000cc][[/color]goSelectTag[color=#0000cc].[/color][color=#ff0000]length[/color][color=#0000cc]][/color] [color=#0000cc]=[/color] [color=#ff0000]item[/color][color=#0000cc]([/color]i[color=#0000cc])[/color][color=#0000cc];[/color]
    [color=#0000cc]}[/color]
[color=#0000cc]}[/color]
[color=#0000cc]}[/color]

[color=#0000cc]}[/color]

[color=#0000ff]function[/color] fTagInBound[color=#0000cc]([/color]aTag[color=#0000cc])[/color][color=#0000cc]{[/color]
[color=#0000ff]var[/color] VicPopCal [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'VicPopCal'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]with[/color] [color=#0000cc]([/color]VicPopCal[color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc])[/color][color=#0000cc]{[/color]
   [color=#0000ff]var[/color] l [color=#0000cc]=[/color] [color=#ff0000]parseInt[/color][color=#0000cc]([/color][color=#ff0000]left[/color][color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#0000ff]var[/color] t [color=#0000cc]=[/color] [color=#ff0000]parseInt[/color][color=#0000cc]([/color][color=#ff0000]top[/color][color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#0000ff]var[/color] r [color=#0000cc]=[/color] l[color=#0000cc]+[/color][color=#ff0000]parseInt[/color][color=#0000cc]([/color][color=#ff0000]width[/color][color=#0000cc])[/color][color=#0000cc];[/color]
   [color=#0000ff]var[/color] b [color=#0000cc]=[/color] t[color=#0000cc]+[/color][color=#ff0000]parseInt[/color][color=#0000cc]([/color][color=#ff0000]height[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] ptLT [color=#0000cc]=[/color] fGetXY[color=#0000cc]([/color]aTag[color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]return[/color] [color=#0000cc]![/color][color=#0000cc]([/color][color=#0000cc]([/color]ptLT[color=#0000cc].[/color][color=#ff0000]x[/color][color=#0000cc]>[/color]r[color=#0000cc])[/color][color=#0000cc]|[/color][color=#0000cc]|[/color][color=#0000cc]([/color]ptLT[color=#0000cc].[/color][color=#ff0000]x[/color][color=#0000cc]+[/color]aTag[color=#0000cc].[/color][color=#ff0000]offsetWidth[/color][color=#0000cc]<[/color]l[color=#0000cc])[/color][color=#0000cc]|[/color][color=#0000cc]|[/color][color=#0000cc]([/color]ptLT[color=#0000cc].[/color][color=#ff0000]y[/color][color=#0000cc]>[/color]b[color=#0000cc])[/color][color=#0000cc]|[/color][color=#0000cc]|[/color][color=#0000cc]([/color]ptLT[color=#0000cc].[/color][color=#ff0000]y[/color][color=#0000cc]+[/color]aTag[color=#0000cc].[/color][color=#ff0000]offsetHeight[/color][color=#0000cc]<[/color]t[color=#0000cc])[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000cc]}[/color]
[color=#0000cc]}[/color]

[color=#0000ff]function[/color] fGetXY[color=#0000cc]([/color]aTag[color=#0000cc])[/color][color=#0000cc]{[/color]
  [color=#0000ff]var[/color] oTmp [color=#0000cc]=[/color] aTag[color=#0000cc];[/color]
  [color=#0000ff]var[/color] pt [color=#0000cc]=[/color] [color=#0000ff]new[/color] Point[color=#0000cc]([/color]0[color=#0000cc],[/color]0[color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]do[/color] [color=#0000cc]{[/color]
   pt[color=#0000cc].[/color][color=#ff0000]x[/color] [color=#0000cc]+[/color][color=#0000cc]=[/color] oTmp[color=#0000cc].[/color][color=#ff0000]offsetLeft[/color][color=#0000cc];[/color]
   pt[color=#0000cc].[/color][color=#ff0000]y[/color] [color=#0000cc]+[/color][color=#0000cc]=[/color] oTmp[color=#0000cc].[/color][color=#ff0000]offsetTop[/color][color=#0000cc];[/color]
   oTmp [color=#0000cc]=[/color] oTmp[color=#0000cc].[/color][color=#ff0000]offsetParent[/color][color=#0000cc];[/color]
  [color=#0000cc]}[/color] [color=#0000ff]while[/color][color=#0000cc]([/color]oTmp[color=#0000cc].[/color][color=#ff00ff]tagName!="BODY"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  
  [color=#0000ff]return[/color] pt[color=#0000cc];[/color]
[color=#0000cc]}[/color]

[/font][font=新宋体][color=#ff9900]// Main: popCtrl is the widget beyond which you want this calendar to appear;
[/color]
[/font][font=新宋体][color=#ff9900]// dateCtrl is the widget into which you want to put the selected date.
[/color]
[/font][font=新宋体][color=#ff9900]// i.e.: <input type="text" name="dc" style="text-align:center" readonly><INPUT type="button" value="V" >
[/color]
[color=#0000ff]function[/color] fPopCalendar[color=#0000cc]([/color]popCtrl[color=#0000cc],[/color] dateCtrl[color=#0000cc],[/color]strDate[color=#0000cc])[/color][color=#0000cc]{[/color]
[color=#0000ff]var[/color] VicPopCal [color=#0000cc]=[/color] [color=#ff0000]document[/color][color=#0000cc].[/color][color=#ff0000]getElementById[/color][color=#0000cc]([/color][color=#ff00ff]'VicPopCal'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]if[/color] [color=#0000cc]([/color]popCtrl [color=#0000cc]=[/color][color=#0000cc]=[/color] previousObject[color=#0000cc])[/color][color=#0000cc]{[/color]
    [color=#0000ff]if[/color] [color=#0000cc]([/color]VicPopCal[color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc].[/color][color=#ff0000]visibility[/color] [color=#0000cc]=[/color][color=#0000cc]=[/color] [color=#ff00ff]"visible"[/color][color=#0000cc])[/color][color=#0000cc]{[/color]
    HiddenDiv[color=#0000cc]([/color][color=#0000cc])[/color][color=#0000cc];[/color]
    [color=#0000ff]return[/color] [color=#0000ff]true[/color][color=#0000cc];[/color]
   [color=#0000cc]}[/color]
   
  [color=#0000cc]}[/color]

  previousObject [color=#0000cc]=[/color] popCtrl[color=#0000cc];[/color]
  gdCtrl [color=#0000cc]=[/color] dateCtrl[color=#0000cc];[/color]
  fInitialDate[color=#0000cc]([/color]strDate[color=#0000cc])[/color][color=#0000cc];[/color]
  
  fSetYearMon[color=#0000cc]([/color]giYear[color=#0000cc],[/color] giMonth[color=#0000cc])[/color][color=#0000cc];[/color]
  
  [color=#0000ff]var[/color] point [color=#0000cc]=[/color] fGetXY[color=#0000cc]([/color]popCtrl[color=#0000cc])[/color][color=#0000cc];[/color]
  [color=#0000ff]with[/color] [color=#0000cc]([/color]VicPopCal[color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc])[/color] [color=#0000cc]{[/color]
   [color=#ff0000]left[/color] [color=#0000cc]=[/color] point[color=#0000cc].[/color][color=#ff0000]x[/color][color=#0000cc];[/color]
[color=#ff0000]top[/color] [color=#0000cc]=[/color] point[color=#0000cc].[/color][color=#ff0000]y[/color][color=#0000cc]+[/color]popCtrl[color=#0000cc].[/color][color=#ff0000]offsetHeight[/color][color=#0000cc];[/color]
[color=#ff0000]width[/color] [color=#0000cc]=[/color] VicPopCal[color=#0000cc].[/color][color=#ff0000]offsetWidth[/color][color=#0000cc];[/color]
[color=#ff0000]width[/color] [color=#0000cc]=[/color] 210[color=#0000cc];[/color] [/font][font=新宋体][color=#ff9900]//
[/color]
[color=#ff0000]height[/color] [color=#0000cc]=[/color] VicPopCal[color=#0000cc].[/color][color=#ff0000]offsetHeight[/color][color=#0000cc];[/color]
fToggleTags[color=#0000cc]([/color]point[color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]visibility[/color] [color=#0000cc]=[/color] [color=#ff00ff]'visible'[/color][color=#0000cc];[/color]
  [color=#0000cc]}[/color]
  [/font][font=新宋体][color=#ff9900]//在firefox下面必须带上px,否则会有异常
[/color]
  VicPopCal[color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc].[/color][color=#ff0000]left[/color] [color=#0000cc]=[/color] point[color=#0000cc].[/color][color=#ff0000]x[/color] [color=#0000cc]+[/color] [color=#ff00ff]"px"[/color][color=#0000cc];[/color]
  VicPopCal[color=#0000cc].[/color][color=#ff0000]style[/color][color=#0000cc].[/color][color=#ff0000]top[/color] [color=#0000cc]=[/color] point[color=#0000cc].[/color][color=#ff0000]y[/color] [color=#0000cc]+[/color] popCtrl[color=#0000cc].[/color][color=#ff0000]offsetHeight[/color] [color=#0000cc]+[/color] [color=#ff00ff]"px"[/color][color=#0000cc];[/color]
[color=#0000cc]}[/color]

[/font][font=新宋体][color=#ff9900]// Added by Han Chen
[/color]
[color=#0000ff]function[/color] fInitialDate[color=#0000cc]([/color]strDate[color=#0000cc])[/color][color=#0000cc]{[/color]
[color=#0000ff]if[/color][color=#0000cc]([/color] strDate [color=#0000cc]=[/color][color=#0000cc]=[/color] [color=#0000ff]null[/color] [color=#0000cc]|[/color][color=#0000cc]|[/color] strDate[color=#0000cc].[/color][color=#ff0000]length[/color] [color=#0000cc]![/color][color=#0000cc]=[/color] 10 [color=#0000cc])[/color]
  [color=#0000ff]return[/color] [color=#0000ff]false[/color][color=#0000cc];[/color]

[color=#0000ff]var[/color] sYear [color=#0000cc]=[/color] strDate[color=#0000cc].[/color][color=#ff0000]substring[/color][color=#0000cc]([/color]0[color=#0000cc],[/color]4[color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] sMonth [color=#0000cc]=[/color] strDate[color=#0000cc].[/color][color=#ff0000]substring[/color][color=#0000cc]([/color]5[color=#0000cc],[/color]7[color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] sDay [color=#0000cc]=[/color] strDate[color=#0000cc].[/color][color=#ff0000]substring[/color][color=#0000cc]([/color]8[color=#0000cc],[/color]10[color=#0000cc])[/color][color=#0000cc];[/color]

[color=#0000ff]if[/color][color=#0000cc]([/color] sMonth[color=#0000cc].[/color][color=#ff0000]charAt[/color][color=#0000cc]([/color]0[color=#0000cc])[/color] [color=#0000cc]=[/color][color=#0000cc]=[/color] [color=#ff00ff]'0'[/color] [color=#0000cc])[/color] [color=#0000cc]{[/color] sMonth [color=#0000cc]=[/color] sMonth[color=#0000cc].[/color][color=#ff0000]substring[/color][color=#0000cc]([/color]1[color=#0000cc],[/color]2[color=#0000cc])[/color][color=#0000cc];[/color] [color=#0000cc]}[/color]
[color=#0000ff]if[/color][color=#0000cc]([/color] sDay[color=#0000cc].[/color][color=#ff0000]charAt[/color][color=#0000cc]([/color]0[color=#0000cc])[/color] [color=#0000cc]=[/color][color=#0000cc]=[/color] [color=#ff00ff]'0'[/color] [color=#0000cc])[/color] [color=#0000cc]{[/color] sDay [color=#0000cc]=[/color] sDay[color=#0000cc].[/color][color=#ff0000]substring[/color][color=#0000cc]([/color]1[color=#0000cc],[/color]2[color=#0000cc])[/color][color=#0000cc];[/color] [color=#0000cc]}[/color]

[color=#0000ff]var[/color] nYear [color=#0000cc]=[/color] [color=#ff0000]parseInt[/color][color=#0000cc]([/color]sYear [color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] nMonth [color=#0000cc]=[/color] [color=#ff0000]parseInt[/color][color=#0000cc]([/color]sMonth[color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]var[/color] nDay [color=#0000cc]=[/color] [color=#ff0000]parseInt[/color][color=#0000cc]([/color]sDay [color=#0000cc])[/color][color=#0000cc];[/color]

[color=#0000ff]if[/color] [color=#0000cc]([/color] [color=#ff0000]isNaN[/color][color=#0000cc]([/color]nYear [color=#0000cc])[/color] [color=#0000cc])[/color] [color=#0000ff]return[/color] [color=#0000ff]false[/color][color=#0000cc];[/color]
[color=#0000ff]if[/color] [color=#0000cc]([/color] [color=#ff0000]isNaN[/color][color=#0000cc]([/color]nMonth[color=#0000cc])[/color] [color=#0000cc])[/color] [color=#0000ff]return[/color] [color=#0000ff]false[/color][color=#0000cc];[/color]
[color=#0000ff]if[/color] [color=#0000cc]([/color] [color=#ff0000]isNaN[/color][color=#0000cc]([/color]nDay [color=#0000cc])[/color] [color=#0000cc])[/color] [color=#0000ff]return[/color] [color=#0000ff]false[/color][color=#0000cc];[/color]

[color=#0000ff]var[/color] arrMon [color=#0000cc]=[/color] [color=#0000ff]new[/color] [color=#ff0000]Array[/color][color=#0000cc]([/color]12[color=#0000cc])[/color][color=#0000cc];[/color]
arrMon[color=#0000cc][[/color] 0[color=#0000cc]][/color] [color=#0000cc]=[/color] 31[color=#0000cc];[/color] arrMon[color=#0000cc][[/color] 1[color=#0000cc]][/color] [color=#0000cc]=[/color] nYear [color=#0000cc]%[/color] 4 [color=#0000cc]=[/color][color=#0000cc]=[/color] 0 [color=#0000cc]?[/color] 29[color=#0000cc]:[/color]28[color=#0000cc];[/color]
arrMon[color=#0000cc][[/color] 2[color=#0000cc]][/color] [color=#0000cc]=[/color] 31[color=#0000cc];[/color] arrMon[color=#0000cc][[/color] 3[color=#0000cc]][/color] [color=#0000cc]=[/color] 30[color=#0000cc];[/color]
arrMon[color=#0000cc][[/color] 4[color=#0000cc]][/color] [color=#0000cc]=[/color] 31[color=#0000cc];[/color] arrMon[color=#0000cc][[/color] 5[color=#0000cc]][/color] [color=#0000cc]=[/color] 30[color=#0000cc];[/color]
arrMon[color=#0000cc][[/color] 6[color=#0000cc]][/color] [color=#0000cc]=[/color] 31[color=#0000cc];[/color] arrMon[color=#0000cc][[/color] 7[color=#0000cc]][/color] [color=#0000cc]=[/color] 31[color=#0000cc];[/color]
arrMon[color=#0000cc][[/color] 8[color=#0000cc]][/color] [color=#0000cc]=[/color] 30[color=#0000cc];[/color] arrMon[color=#0000cc][[/color] 9[color=#0000cc]][/color] [color=#0000cc]=[/color] 31[color=#0000cc];[/color]
arrMon[color=#0000cc][[/color]10[color=#0000cc]][/color] [color=#0000cc]=[/color] 30[color=#0000cc];[/color] arrMon[color=#0000cc][[/color]11[color=#0000cc]][/color] [color=#0000cc]=[/color] 31[color=#0000cc];[/color]

[color=#0000ff]if[/color] [color=#0000cc]([/color] nYear [color=#0000cc]<[/color] 1900 [color=#0000cc]|[/color][color=#0000cc]|[/color] nYear [color=#0000cc]>[/color] 2008 [color=#0000cc])[/color] [color=#0000ff]return[/color] [color=#0000ff]false[/color][color=#0000cc];[/color]
[color=#0000ff]if[/color] [color=#0000cc]([/color] nMonth [color=#0000cc]<[/color] 1 [color=#0000cc]|[/color][color=#0000cc]|[/color] nMonth [color=#0000cc]>[/color] 12 [color=#0000cc])[/color] [color=#0000ff]return[/color] [color=#0000ff]false[/color][color=#0000cc];[/color]
[color=#0000ff]if[/color] [color=#0000cc]([/color] nDay [color=#0000cc]<[/color] 1 [color=#0000cc]|[/color][color=#0000cc]|[/color] nDay [color=#0000cc]>[/color] arrMon[color=#0000cc][[/color]nMonth [color=#0000cc]-[/color] 1[color=#0000cc]][/color] [color=#0000cc])[/color] [color=#0000ff]return[/color] [color=#0000ff]false[/color][color=#0000cc];[/color]

giYear [color=#0000cc]=[/color] nYear[color=#0000cc];[/color]
giMonth [color=#0000cc]=[/color] nMonth[color=#0000cc];[/color]
giDay [color=#0000cc]=[/color] nDay[color=#0000cc];[/color]
[color=#0000ff]return[/color] [color=#0000ff]true[/color][color=#0000cc];[/color]
[color=#0000cc]}[/color]

[color=#0000ff]var[/color] gMonths [color=#0000cc]=[/color] [color=#0000ff]new[/color] [color=#ff0000]Array[/color][color=#0000cc]([/color][color=#ff00ff]"1月"[/color][color=#0000cc],[/color][color=#ff00ff]"2月"[/color][color=#0000cc],[/color][color=#ff00ff]"3月"[/color][color=#0000cc],[/color][color=#ff00ff]"4月"[/color][color=#0000cc],[/color][color=#ff00ff]"5月"[/color][color=#0000cc],[/color][color=#ff00ff]"6月"[/color][color=#0000cc],[/color][color=#ff00ff]"7月"[/color][color=#0000cc],[/color][color=#ff00ff]"8月"[/color][color=#0000cc],[/color][color=#ff00ff]"9月"[/color][color=#0000cc],[/color][color=#ff00ff]"10月"[/color][color=#0000cc],[/color][color=#ff00ff]"11月"[/color][color=#0000cc],[/color][color=#ff00ff]"12月"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]with[/color] [color=#0000cc]([/color][color=#ff0000]document[/color][color=#0000cc])[/color] [color=#0000cc]{[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<Div id='VicPopCal' style='POSITION:absolute;VISIBILITY:hidden;border:0px ridge;z-index:100;'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<table border='0' bgcolor='#cccccc' style='FONT-SIZE: 12px;'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<TR>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<td valign='middle' align='center'><input type='button' name='PrevMonth' value='<' style='height:20;width:20;FONT:bold' onClick='fPrevMonth()'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]" <SELECT name='tbSelYear' id='tbSelYear' onChange='fUpdateCal()' Victor='Won'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]for[/color][color=#0000cc]([/color]i[color=#0000cc]=[/color]1900[color=#0000cc];[/color]i[color=#0000cc]<[/color]2008[color=#0000cc];[/color]i[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<OPTION value='"[/color][color=#0000cc]+[/color]i[color=#0000cc]+[/color][color=#ff00ff]"'>"[/color][color=#0000cc]+[/color]i[color=#0000cc]+[/color][color=#ff00ff]" </OPTION>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</SELECT>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]" <select name='tbSelMonth' id='tbSelMonth' onChange='fUpdateCal()' Victor='Won'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000ff]for[/color] [color=#0000cc]([/color]i[color=#0000cc]=[/color]0[color=#0000cc];[/color] i[color=#0000cc]<[/color]12[color=#0000cc];[/color] i[color=#0000cc]+[/color][color=#0000cc]+[/color][color=#0000cc])[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<option value='"[/color][color=#0000cc]+[/color][color=#0000cc]([/color]i[color=#0000cc]+[/color]1[color=#0000cc])[/color][color=#0000cc]+[/color][color=#ff00ff]"'>"[/color][color=#0000cc]+[/color]gMonths[color=#0000cc][[/color]i[color=#0000cc]][/color][color=#0000cc]+[/color][color=#ff00ff]"</option>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</SELECT>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]" <input type='button' name='PrevMonth' value='>' style='height:20;width:20;FONT:bold' onclick='fNextMonth()'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</td>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</TR><TR>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<td align='center'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<DIV style='background-color:teal'><table width='100%' border='0'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
fDrawCal[color=#0000cc]([/color]giYear[color=#0000cc],[/color] giMonth[color=#0000cc],[/color] 20[color=#0000cc],[/color] [color=#ff00ff]'12'[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</table></DIV>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</td>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</TR><TR><TD align='center'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<TABLE width='100%' style='FONT-SIZE: 12px;'><TR><TD align='center'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<B style='cursor:pointer' onclick='HiddenDiv()' onMouseOver='this.style.color=gcToggle' onMouseOut='this.style.color=0'>关闭</B>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</td><td algin='center' style='FONT-SIZE: 12px;'>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"<B style='cursor:pointer' onclick='fSetDate("[/color] [color=#0000cc]+[/color] giYear [color=#0000cc]+[/color] [color=#ff00ff]","[/color] [color=#0000cc]+[/color] giMonth [color=#0000cc]+[/color] [color=#ff00ff]","[/color] [color=#0000cc]+[/color] giDay [color=#0000cc]+[/color] [color=#ff00ff]")' onMouseOver='this.style.color=gcToggle' onMouseOut='this.style.color=0'>今天: "[/color][color=#0000cc]+[/color]giYear[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]giMonth[color=#0000cc]+[/color][color=#ff00ff]"-"[/color][color=#0000cc]+[/color]giDay[color=#0000cc]+[/color][color=#ff00ff]"</B>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</td></tr></table>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</TD></TR>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#ff0000]write[/color][color=#0000cc]([/color][color=#ff00ff]"</TABLE></Div>"[/color][color=#0000cc])[/color][color=#0000cc];[/color]
[color=#0000cc]}[/color][/font]



HTML代码:

[font=新宋体][color=#0000cc]<[/color][color=#0000ff]TABLE[/color] [color=#ff0000]cellSpacing[/color][color=#0000cc]=[/color]9 [color=#ff0000]cellPadding[/color][color=#0000cc]=[/color]0 [color=#ff0000]width[/color][color=#0000cc]=[/color]500 [color=#ff0000]border[/color][color=#0000cc]=[/color]0[color=#0000cc]>[/color]
  [color=#0000cc]<[/color][color=#0000ff]TBODY[/color][color=#0000cc]>[/color]
    [color=#0000cc]<[/color][color=#0000ff]TR[/color][color=#0000cc]>[/color]
      [color=#0000cc]<[/color][color=#0000ff]TD[/color] [color=#ff0000]align[/color][color=#0000cc]=[/color]right [color=#0000ff]style[/color][color=#0000cc]=[/color][color=#ff00ff]'FONT-SIZE: 12px;'[/color][color=#0000cc]>[/color]日历控件样式:[color=#0000cc]<[/color][color=#0000cc]/[/color][color=#0000ff]TD[/color][color=#0000cc]>[/color]
      [color=#0000cc]<[/color][color=#0000ff]TD[/color][color=#0000cc]>[/color][color=#0000cc]<[/color][color=#0000ff]INPUT[/color] [color=#ff0000]id[/color][color=#0000cc]=[/color]inputBirthday [color=#0000ff]style[/color][color=#0000cc]=[/color][color=#ff00ff]"WIDTH: 180px"[/color] [color=#ff0000]onclick[/color][color=#0000cc]=[/color][color=#ff00ff]"fPopCalendar(this,this,this.value);return false;"[/color] [color=#ff0000]readOnly[/color] [color=#ff0000]maxLength[/color][color=#0000cc]=[/color]15 [color=#ff0000]value[/color][color=#0000cc]=[/color]1984-01-01 [color=#ff0000]name[/color][color=#0000cc]=[/color]inputBirthday[color=#0000cc]>[/color][color=#0000cc]<[/color][color=#0000cc]/[/color][color=#0000ff]TD[/color][color=#0000cc]>[/color]
      [color=#0000cc]<[/color][color=#0000ff]TD[/color][color=#0000cc]>[/color] [color=#0000cc]<[/color][color=#0000ff]DIV[/color] [color=#ff0000]class[/color][color=#0000cc]=[/color]tip-error [color=#ff0000]id[/color][color=#0000cc]=[/color]BirthdayDiv[color=#0000cc]>[/color][color=#0000cc]<[/color][color=#0000cc]/[/color][color=#0000ff]DIV[/color][color=#0000cc]>[/color][color=#0000cc]<[/color][color=#0000cc]/[/color][color=#0000ff]TD[/color][color=#0000cc]>[/color]
    [color=#0000cc]<[/color][color=#0000cc]/[/color][color=#0000ff]TR[/color][color=#0000cc]>[/color]
  [color=#0000cc]<[/color][color=#0000cc]/[/color][color=#0000ff]TBODY[/color][color=#0000cc]>[/color]
[color=#0000cc]<[/color][color=#0000cc]/[/color][color=#0000ff]TABLE[/color][color=#0000cc]>[/color][/font]

[[i] 本帖最后由 php 于 2007-9-10 09:06 编辑 [/i]]

黑发的放牧者 2007-11-29 11:51

谢谢,LZ,俺收下了。o(∩_∩)o...哈哈。
页: [1]
查看完整版本: javascript日历控件以及使用方法