Traditional Culture Encyclopedia - Almanac inquiry - I want to add a perpetual calendar to the homepage of the website. Who can help me change the code?
I want to add a perpetual calendar to the homepage of the website. Who can help me change the code?
//CLD。 SY.selectedIndex = yangy//- 1900;
//push TM(‘YU‘);
//push TM(‘YD‘‘);
CLD。 SM.selectedIndex = yangm
push TM(“MD“);
push TM(“MU“);
}
//changeLong end
Function change CLD(){
var y,m;
y=CLD。 sy . selectedindex+ 1900;
m=CLD。 SM.selectedIndex
draw CLD(y,m);
}
Function push TM(K ){ (
Switch (K ){
Case "Yu":
If (CLD. SY.selectedIndex & gtCLD。 sy . selectedindex-;
Break;
Case "YD":
If (CLD. SY.selectedIndex & ltCLD 149)。 sy . selectedindex++;
Break;
Case "MU":
If (CLD. SM.selectedIndex & gt0) {
CLD。 sm . selectedindex-;
}
Otherwise {
CLD。 sm . selectedindex = 1 1;
If (CLD. SY.selectedIndex & gtCLD。 sy . selectedindex-;
}
Break;
Case "MD":
If (CLD. SM.selectedIndex & lt 1 1) {
CLD。 sm . selectedindex++;
}
Otherwise {
CLD。 sm . selectedindex = 0;
If (CLD. SY.selectedIndex & ltCLD 149)。 sy . selectedindex++;
}
Break;
Default value:
CLD。 sy . selectedindex = tY- 1900;
CLD。 SM.selectedIndex = tM
}
change CLD();
}
var Today = new Date();
var tY = today . get full year();
var tM = today . getmonth();
var tD = today . getdate();
//////////////////////////////////////////////////////////////////////////////
var width =“ 130“;
var offsetx = 2;
var offsety = 16;
var x = 0;
var y = 0;
var snow = 0;
var SW = 0;
var CNT = 0;
var dStyle
document.onmousemove = mEvn
//Display detailed date information.
Function mOvr(v ){ (
Var s, festivals;
var sObj = eval(‘SD’‘+v);
var d = sobj . innerhtml- 1;
//year, month, day, week,
//year, month, day, month,
//cYear,cMonth,cDay
if(sobj . innerhtml! ='''') {
Sobj.style.cursor = "s-resize";
if(CLD【d】。 solarTerms = =““““& amp; & ampCLD【d】solarFestival = =““““& amp; & ampCLD【d】lunar festival = =‘‘‘‘)
festival =““““;
other
festival =““& lt; Table width = 100% BORDER=0 cell filling =4 cell spacing = 0bgcolor = "# 333333" > & ltTR & gt& ltTD ALIGN =“RIGHT“& gt。 ''+
‘‘& lt; FONT style =“color:# FFFFFF; font-size:9pt“& gt。 ‘‘+CLD【d】。 solarTerms+““““+CLD【d】。 solarFestival+““““+CLD【d】。 lunar festival+““& lt; /FONT & gt; & lt/TD & gt; ''+
‘‘& lt; /TR & gt; & lt/TABLE & gt; '';
s =‘‘‘& lt; TABLE WIDTH =“ 140“BORDER = 0 cell padding =“0“CELLSPACING = 0 BGCOLOR =“# 000099“& gt; & ltTR & gt& ltTD & gt'' +
‘‘& lt; Table width = 100% BORDER=0 cell filling =4 cell spacing = 0> & lttr & gt & lttdalign = "right" nowrap & gt. & ltFONT style =“color:# FFFFFF; font-size:9pt“& gt。 ''+
CLD【d】sYear+“year“+CLD【d】。 Month+'month'+CLD [d]. Sday+'day week''+CLD [d]. Zhou+''br > ‘+
‘‘& lt; font color =“fuchsia“& gt。 Lunar calendar "+"(CLD [d]. islap? leap“”“““)+CLD【d】。 Lmonth+'month''+CLD [d]. Lday+''day & ltbr & gt''+
‘‘& lt; font color =“yellow“& gt。 +CLD【d】。 cyyear+“year“+CLD【d】。 CMonth+ "month"+CLD [d]. cDay+‘day《/font & gt; ‘+
‘‘& lt; /FONT & gt; & lt/TD & gt; & lt/TR & gt; & lt/TABLE & gt; ‘+festival+‘‘& lt; /TD & gt; & lt/TR & gt; & lt/TABLE & gt; '';
document . all【“detail“】。 innerHTML = s;
if(snow = = 0 ){
d style . left = x+offsetx-(width/2);
d style . top = y+offsety;
d style . visibility =“visible“;
snow = 1;
}
}
}
//Clear detailed date data
Function mOut(){
if(CNT & gt; = 1){ SW = 0 }
if(SW = = 0)
{ snow = 0;
d style . visibility =“hidden“; }
else cnt++;
}
//Get location
Function mEvn(){
x = event.x
y = event.y
if(document . body . scroll left)
{ x = event . x+document . body . scroll left; y = event . y+document . body . scroll top; }
If (snow)
DStyle.left = x+offsetx- (width /2)
d style . top = y+offset
}
}
///////////////////////////////////////////////////////////////////////////
Function tick(){
Today's risk value
Today = New Date ()
Clock. Innerhtml = today. tolocalstring()。 Replace (/(year | month) /g, "/"). Replace (/day/, "");
//clock . innerhtml = time add(today . togmtstring(),CLD。 TZ.value)
window . settimeout(“tick()“, 1000);
}
Function setCookie (name, value) (
Var today = new date ()
Var Expired = New Date ()
expires . settime(today . gettime()+ 1000 * 60 * 60 * 24 * 365)
document . cookie = name+“=“+escape(value)+“; expires =“+expires . togmtstring()
}
Function get cookie(Name ){
var search = Name+“=“
if(document . cookie . length & gt; 0) {
offset = document . cookie . index of(search)
if(offset! = - 1) {
Offset+= search.length.
end = document . cookie . index of(“; "offset)
if(end = =- 1)end = document . cookie . length
Returns UNESCAPE (document.cookie.substring (offset, end)).
}
Otherwise, return ""
}
}
/////////////////////////////////////////////////////////
Function initial(){
dStyle = detail.style
CLD。 sy . selectedindex = tY- 1900;
CLD。 SM.selectedIndex = tM
draw CLD(tY,tM);
// CLD。 tz . selectedindex = get cookie(“TZ“);
//changeTZ();
tick();
}
//--& gt;
& lt/SCRIPT & gt;
& ltSTYLE & gt。 todyaColor {
Background color: #99ff00
}
& lt/STYLE & gt;
& ltMETA content =“MSHTML 6 . 00 . 2800 . 1 106“name = GENERATOR & gt。 & lt/HEAD & gt;
& ltBODY oncontext menu = self . event . return value = false background =“/root/mnt/52005325 163735 . gif“
left margin = 0 top margin = 0 onload = initial()& gt;
& lt Table Height = "100%" Cell Spacing =0 Cell Filling =0 Width = "100%" Alignment = Center.
border = 0 & gt
& lt form name = CLD>;;
& ltTBODY & gt
& ltTR & gt
& ltTD valign=middle align=center>。
& lt scripting language = JavaScript & gt
& lt/SCRIPT & gt;
& ltDIV id = details
style =“LEFT:330 px; Width:140px; Location: absolute; TOP: 199 px; Height:16px ""; & lt/DIV & gt;
& lt Table cell spacing = 1 cell filling =1align = centerbgcolor = # 000000.
border = 0 & gt& ltTBODY & gt
& ltTR bgColor=#ffffff>。
& ltTD vAlign=top width=220>。
& lt Table height = "100%" Cell spacing =0 Cell filling =4 Width = "100%"
align = center border = 0 & gt
& ltTBODY & gt
& ltTR height = 28 & gt
& ltTD align = center bgColor = # 333333 & gt。 & lt font
Color = white & gt calendar query
& ltTR height = * & gt
& ltTD align=center>。 & ltFONT id=tSave
style =“FONT-SIZE: 18pt; Color: red; FONT-FAMILY: Wingdings“》。 & lt/FONT & gt; Gregorian calendar:
& ltSELECT class = input 1 onchange = change CLD()name = SY & gt;
& lt scripting language = JavaScript & gt
& lt! -
for(I = 1900; I & lt2050; i++)document . write(‘‘& lt; Option & gt'+I)
//--& gt;
& lt/SCRIPT & gt;
& lt/SELECT & gt; Year "select class = input1onchange = changecld () name = sm >
& lt scripting language = JavaScript & gt
& lt! -
for(I = 1; I< 13; i++)document . write(‘‘& lt; Option & gt'+I)
//--& gt;
& lt/SCRIPT & gt;
& lt/SELECT & gt; BR>& ltBR & gt lunar calendar:
onchange = changeLong()name = d 1 & gt;
& lt scripting language = JavaScript & gt
& lt! -
for(I = 1900; I & lt2050; i++)document . write(‘‘& lt; Option & gt'+I)
//--& gt;
& lt/SCRIPT & gt;
& lt/SELECT & gt; Year "select class = input1onchange = changelong () name = D2 >
& lt scripting language = JavaScript & gt
& lt! -
for(I = 1; I< 13; i++)document . write(‘‘& lt; Option & gt'+I)
//--& gt;
& lt/SCRIPT & gt;
& lt/SELECT & gt; Br> & ltbr & gt & ltbr & gt</TD > & lt/TR & gt;
& ltTR height = 28 & gt
& ltTD align = center width = 240 bgColor = # dddddd
Height = 28> Current time:
id = Clock & gt& lt/FONT & gt; & lt! -Time zone * means automatic adjustment to daylight saving time->
& lt/TD & gt;
& lttr height = 28 & gt
& lttd & gt& ltdiv align =“center“& gt; & ltimg src =“/root/mnt/36 15244 _ 744 149 1 . gif“& gt; & lt/div & gt;
& lt/TD & gt;
& lt/tr & gt; & lt/TBODY & gt; & lt/TABLE & gt; & lt/TD & gt;
& ltTD align = center width = 420 height = 255 rowSpan = 3 & gt。
& lt Table height =28 cell spacing =4 cell filling = 0 width = "100%"
bgColor=#333333 border=0>。
& ltdiv align =“center“& gt; & ltimg src =“/root/mnt/0002 . gif“& gt; & lt/div & gt;
& ltTBODY & gt
& ltTR & gt
& ltTD width=5>。 & ltFONT title= Last year
style =“CURSOR:hand; COLOR:# ffffff“onclick =“push TM(‘YU‘‘)“
face=webdings>。 & lt/FONT & gt; & lt/TD & gt;
& ltTD width=5>。 & ltFONT title= Last month
style =“CURSOR:hand; COLOR:# ffffff“onclick =“push TM(‘MU‘‘)“
face=webdings>。 & lt/FONT & gt; & lt/TD & gt;
& ltTD & gt& ltFONT id=YMBG color=#ffffff>。 & lt/FONT & gt; & lt/TD & gt;
& ltTD align=right>。 & ltGZ color=#ffffff>。 & lt/FONT & gt; & lt/TD & gt;
& ltTD align=right width=5>。 & ltFONT title= next month
style =“CURSOR:hand; COLOR:# ffffff“onclick =“push TM(‘MD‘‘)“
face=webdings>。 & lt/FONT & gt; & lt/TD & gt;
& ltTD align=right width=5>。 & ltFONT title= next year
style =“CURSOR:hand; COLOR:# ffffff“onclick =“push TM(‘YD‘‘)“
face=webdings>。 & lt/FONT & gt; & lt/TD & gt; & lt/TR & gt; & lt/TBODY & gt; & lt/TABLE & gt;
& lt Table cell spacing = 1 cell filling = 0 width = "100%" bgcolor = # ffffff.
border = 0 & gt
& ltTBODY & gt
& ltTR align = center bgColor = # dddddd & gt。
& ltTD width=60 height=24>。 Japanese "/TD >
& ltTD width=60>。 1《/TD & gt;
& ltTD width=60>。 The second "/TD >
& ltTD width=60>。 three
& ltTD width=60>。 four
& ltTD width=60>。 five
& ltTD width=60>。 six
& lt scripting language = JavaScript & gt
& lt! -
GNum variety
for(I = 0; I<6; i++) {
document . write(‘‘& lt; tr align=center>。 '')
for(j = 0; j & lt7; j++) {
gNum = i*7+j
document . write(‘‘& lt; TD id =“GD““+gNum+““onMouseOver =“mOvr(“+gNum+““)“onMouseOut =“mOut()“nowrap & gt。 & ltfont id =“SD““+gNum+““size = 2 face =“Arial Black“““)
if(j = = 0)document . write(‘color = red‘‘)
If (j == 6)
if(I % 2 = = 1)document . write(“color = red“)
else document . write(‘color = green‘)
document . write(‘TITLE =““& gt; & lt/font & gt; & ltbr & gt& ltfont id =“LD“+gNum+““style =“font-size:9pt“& gt。 & lt/font & gt; & lt/TD & gt; '')
}
document . write(‘‘& lt; /tr & gt; '')
}
//--& gt;
& lt/SCRIPT & gt;
& ltTR & gt
& ltTD & gt& lt/TD & gt; & lt/TR & gt; & lt/TBODY & gt; & lt/TABLE & gt; & lt/TD & gt; & lt/TR & gt; & lt/TBODY & gt; & lt/TABLE & gt;
& lt/TD & gt; & lt/TR & gt; & lt/FORM & gt; & lt/TBODY & gt; & lt/TABLE & gt; & lt, ; /BODY & gt; & lt/HTML
- Previous article:When is the date of the full moon?
- Next article:Dream of doing activities
- Related articles
- It's not good for you to help people look after their lives. It's not good for you.
- 65438+ Gregorian calendar February 23, 0936
- Dream of my dead grandmother and hug her.
- Mountain tiger and Phytolacca acinosa time
- Gregorian calendar may 29, 2022
- Gregorian calendar in 2020
- Lao Huang Li 2023 Qing Palace
- Is it auspicious to get married on September 5, 2022? Is it suitable for marriage?
- 20 19 122 Zodiac
- 2023165438+1October 19, a quick dressing guide for the five elements.