QQ网名大全

asp中怎样做万年历?

// jscript 文件

document.writeln('<div id=meizzdatelayer style="position: absolute; width: 142; height: 166; z-index: 9998; d**play: none">');
document.writeln('<span id=tmpselectyearlayer style="z-index: 9999;position: absolute;top: 2; left: 18;d**play: none"></span>');
document.writeln('<span id=tmpselectmonthlayer style="z-index: 9999;position: absolute;top: 2; left: 75;d**play: none"></span>');
document.writeln('<table border=0 cellspacing=1 cellpadding=0 width=142 height=160 bgcolor=#808080 onselectstart="return false">');
document.writeln(' <tr><td width=142 height=23 bgcolor=#ffffff><table border=0 cellspacing=1 cellpadding=0 width=140 height=23>');
document.writeln(' <tr align=center><td width=20 align=center bgcolor=#808080 style="font-size:12px;cursor: hand;color: #ffd700" ');
document.writeln(' onclick="meizzprevm()" title="向前翻 月" author=meizz><b author=meizz><<</b>');
document.writeln(' </td><td width=100 align=center style="font-size:12px;cursor:default" author=meizz>');
document.writeln(' <span author=meizz id=meizzyearhead onclick="tmpselectyearinnerhtml(th**.innertext)"></span> 年 <span');
document.writeln(' id=meizzmonthhead author=meizz onclick="tmpselectmonthinnerhtml(th**.innertext)"></span> 月</td>');
document.writeln(' <td width=20 bgcolor=#808080 align=center style="font-size:12px;cursor: hand;color: #ffd700" ');
document.writeln(' onclick="meizznextm()" title="往后翻 月" author=meizz><b author=meizz>>></b></td></tr>');
document.writeln(' </table></td></tr>');
document.writeln(' <tr><td width=142 height=18 bgcolor=#808080>');
document.writeln('<table border=0 cellspacing=0 cellpadding=0 width=140 height=1 style="cursor:default">');
document.writeln('<tr align=center><td style="font-size:12px;color:#ffffff" author=meizz>日</td>');
document.writeln('<td style="font-size:12px;color:#ffffff" author=meizz>一</td><td style="font-size:12px;color:#ffffff" author=meizz>二</td>');
document.writeln('<td style="font-size:12px;color:#ffffff" author=meizz>三</td><td style="font-size:12px;color:#ffffff" author=meizz>四</td>');
document.writeln('<td style="font-size:12px;color:#ffffff" author=meizz>五</td><td style="font-size:12px;color:#ffffff" author=meizz>六</td></tr>');
document.writeln('</table></td></tr><!-- author:f.r.huang(meizz)meizz @ hzcnc.com 2002-10-8 -->');
document.writeln(' <tr><td width=142 height=120>');
document.writeln(' <table border=0 cellspacing=1 cellpadding=0 width=140 height=120 bgcolor=#ffffff>');
var n=0; for (j=0;j<5;j++){ document.writeln (' <tr align=center>'); for (i=0;i<7;i++){
document.writeln('<td width=20 height=20 id=meizzday'+n+' style="font-size:12px" author=meizz onclick=meizzdayclick(th**.innertext)></td>');n++;}
document.writeln('</tr>');}
document.writeln(' <tr align=center><td width=20 height=20 style="font-size:12px" id=meizzday35 author=meizz ');
document.writeln(' onclick=meizzdayclick(th**.innertext)></td>');
document.writeln(' <td width=20 height=20 style="font-size:12px" id=meizzday36 author=meizz onclick=meizzdayclick(th**.innertext)></td>');
document.writeln(' <td colspan=5 align=right author=meizz><span onclick=closelayer() style="font-size:12px;cursor: hand"');
document.writeln(' author=meizz title=""><u>关闭</u></span> </td></tr>');
document.writeln(' </table></td></tr><tr><td>');
document.writeln(' <table border=0 cellspacing=1 cellpadding=0 width=100% bgcolor=#ffffff>');
document.writeln(' <tr><td author=meizz align=left><input author=meizz type=button value="< " title="向前翻 年" onclick="meizzprevy()" ');
document.writeln(' onfocus="th**.blur()" class="button"><input author=meizz title="向前翻 月" type=button ');
document.writeln(' value="<<" onclick="meizzprevm()" onfocus="th**.blur()" class="button"></td><td ');
document.writeln(' author=meizz align=center><input author=meizz type=button value="今天" onclick="meizztoday()" ');
document.writeln(' onfocus="th**.blur()" title="现在的年月" class="button"></td><td ');
document.writeln(' author=meizz align=right><input author=meizz type=button value=">>" onclick="meizznextm()" ');
document.writeln(' onfocus="th**.blur()" title="往后翻 月" class="button"><input ');
document.writeln(' author=meizz type=button value=" >" title="往后翻 年" onclick="meizznexty()"');
document.writeln(' onfocus="th**.blur()" class="button"></td>');
document.writeln('</tr></table></td></tr></table></div>');
var outobject;
function setday(tt,obj)
{
//alert("d");
if (arguments.length > 2){alert("对不起!传入本控件的参数太多!");return;}
if (arguments.length == 0){alert("对不起!您没有传回本控件任何参数!");return;}
var dads = document.all.meizzdatelayer.style;var th = tt;
var ttop = tt.offsettop;
var thei = tt.clientheight;
var tleft = tt.offsetleft;
var ttyp = tt.type;
while (tt = tt.offsetparent){ttop+=tt.offsettop; tleft+=tt.offsetleft;}
dads.top = (ttyp=="image")? ttop+thei : ttop+thei+6;
dads.left = tleft-20;
outobject = (arguments.length == 1) ? th : obj;
dads.d**play = '';
event.returnvalue=false;

// document.getelementbyid("dropgqyj").style.d**play="none";
// //document.getelementbyid("th1").style.d**play="inline";
// document.getelementbyid("th2").style.d**play="inline";
// document.getelementbyid("bodyall").style.d**play="block";
// document.getelementbyid("bodyall").style.height=document.body.offsetheight;
// document.getelementbyid("bodyall").style.width=document.body.offsetwidth;
// document.getelementbyid("drop**lb").d**abled="d**abled";

}
var monhead = new array(12);
monhead[0] = 31; monhead[1] = 28; monhead[2] = 31; monhead[3] = 30; monhead[4] = 31; monhead[5] = 30;
monhead[6] = 31; monhead[7] = 31; monhead[8] = 30; monhead[9] = 31; monhead[10] = 30; monhead[11] = 31;
var meizztheyear=new date().getfullyear();
var meizzthemonth=new date().getmonth()+1;
var meizzwday=new array(37);
function document.onclick()
{
with(window.event.srcelement)
{ if (getattribute("author")==** && tagname != "input")
document.all.meizzdatelayer.style.d**play="none";
// onc2();
}
}
function meizzwritehead(yy,mm)
{ document.all.meizzyearhead.innertext = yy;
document.all.meizzmonthhead.innertext = mm;
}
function tmpselectyearinnerhtml(stryear)
{
if (stryear.match(/\d/)!=**){alert("年份输入参数不是数字!");return;}
var m = (stryear) ? stryear : new date().getfullyear();
if (m < 1000 || m > 9999) {alert("年份值不在 1000 到 9999 之间!");return;}
var n = m - 10;
if (n < 1000) n = 1000;
if (n + 26 > 9999) n = 9974;
var s = "<select author=meizz name=tmpselectyear style='font-size: 12px' "
s += "onblur='document.all.tmpselectyearlayer.style.d**play=\"none\"' "
s += "onchange='document.all.tmpselectyearlayer.style.d**play=\"none\";"
s += "meizztheyear = th**.value; meizzsetday(meizztheyear,meizzthemonth)'>\r\n";
var selectinnerhtml = s;
for (var i = n; i < n + 26; i++)
{
if (i == m)
{selectinnerhtml += "<option value='" + i + "' selected>" + i + "年" + "</option>\r\n";}
else {selectinnerhtml += "<option value='" + i + "'>" + i + "年" + "</option>\r\n";}
}
selectinnerhtml += "</select>";
document.all.tmpselectyearlayer.style.d**play="";
document.all.tmpselectyearlayer.innerhtml = selectinnerhtml;
document.all.tmpselectyear.focus();
}
function tmpselectmonthinnerhtml(strmonth)
{
if (strmonth.match(/\d/)!=**){alert("月份输入参数不是数字!");return;}
var m = (strmonth) ? strmonth : new date().getmonth() + 1;
var s = "<select author=meizz name=tmpselectmonth style='font-size: 12px' "
s += "onblur='document.all.tmpselectmonthlayer.style.d**play=\"none\"' "
s += "onchange='document.all.tmpselectmonthlayer.style.d**play=\"none\";"
s += "meizzthemonth = th**.value; meizzsetday(meizztheyear,meizzthemonth)'>\r\n";
var selectinnerhtml = s;
for (var i = 1; i < 13; i++)
{
if (i == m)
{selectinnerhtml += "<option value='"+i+"' selected>"+i+"月"+"</option>\r\n";}
else {selectinnerhtml += "<option value='"+i+"'>"+i+"月"+"</option>\r\n";}
}
selectinnerhtml += "</select>";
document.all.tmpselectmonthlayer.style.d**play="";
document.all.tmpselectmonthlayer.innerhtml = selectinnerhtml;
document.all.tmpselectmonth.focus();
}
function closelayer()
{
document.all.meizzdatelayer.style.d**play="none";
}
function document.onkeydown()
{
if (window.event.keycode==27)document.all.meizzdatelayer.style.d**play="none";
}
function **pinyear(year)
{
if (0==year%4&&((year%100!=0)||(year%400==0))) return true;else return false;
}
function getmonthcount(year,month)
{
var c=monhead[month-1];if((month==2)&&**pinyear(year)) c++;return c;
}
function getdow(day,month,year)
{
var dt=new date(year,month-1,day).getday()/7; return dt;
}
function meizzprevy()
{
if(meizztheyear > 999 && meizztheyear <10000){meizztheyear--;}
else{alert("年份超出范围(1000-9999)!");}
meizzsetday(meizztheyear,meizzthemonth);
}
function meizznexty()
{
if(meizztheyear > 999 && meizztheyear <10000){meizztheyear++;}
else{alert("年份超出范围(1000-9999)!");}
meizzsetday(meizztheyear,meizzthemonth);
}
function meizztoday()
{
meizztheyear = new date().getfullyear();
meizzthemonth = new date().getmonth()+1;
meizzsetday(meizztheyear,meizzthemonth);
}
function meizzprevm()
{
if(meizzthemonth>1){meizzthemonth--}else{meizztheyear--;meizzthemonth=12;}
meizzsetday(meizztheyear,meizzthemonth);
}
function meizznextm()
{
if(meizzthemonth==12){meizztheyear++;meizzthemonth=1}else{meizzthemonth++}
meizzsetday(meizztheyear,meizzthemonth);
}
function meizzsetday(yy,mm)
{
meizzwritehead(yy,mm);
for (var i = 0; i < 37; i++){meizzwday[i]=""};
var day1 = 1,firstday = new date(yy,mm-1,1).getday();
for (var i = firstday; day1 < getmonthcount(yy,mm)+1; i++){meizzwday[i]=day1;day1++;}
for (var i = 0; i < 37; i++)
{ var da = eval("document.all.meizzday"+i)
if (meizzwday[i]!="")
{ da.innerhtml = "<b>" + meizzwday[i] + "</b>";
da.style.backgroundcolor = (yy == new date().getfullyear() &&
mm == new date().getmonth()+1 && meizzwday[i] == new date().getdate()) ? "#ffd700" : "#add8e6";
da.style.cursor="hand"
}
else{da.innerhtml="";da.style.backgroundcolor="";da.style.cursor="default"}
}
}
function meizzdayclick(n)
{
var yy = meizztheyear;
var mm = meizzthemonth;
if (mm < 10){mm = "0" + mm;}
if (outobject)
{
if (!n) {outobject.value=""; return;}
if ( n < 10){n = "0" + n;}
outobject.value= yy + "-" + mm + "-" + n ;
closelayer();
}
else {closelayer(); alert("您所要输出的控件对象并不存在!");}
}
meizzsetday(meizztheyear,meizzthemonth);

//function onc2()
//{
//
// document.getelementbyid("bodyall").style.d**play="none";
//
//
//}
佚名
2024-05-25 15:18:22
最佳回答
类似问题(10)
  • 佚名
    2024-05-25 20:34:18

    为什么老黄历和中华万年历不一样?

    经原意指江河水流,后引入中**喻人体气血循行不息。络原是水利学名词,春秋时引入中**,指沟通水脉的沟渠,喻沟通经气血脉的横行通道。老黄历里的经络并不是经络治疗的...

  • 佚名
    2024-05-25 15:29:20

    怎样查询万年历?

    直接在页面上搜索就行了。

  • 佚名
    2024-05-25 10:39:44

    万年历和中华万年历日历app 哪个好

    这两个软件都差不多,你可以通过360手机助手一类的来下载安装来试试体验一下来看看自己喜欢哪一个。

  • 佚名
    2024-05-25 13:44:19

    1900年以前万年历怎样查询

    去下载一个中华万年历什么都能查出来

  • 佚名
    2024-05-25 08:00:00

    中华万年历怎么查1972年

    爱里阿里们伊马们东能亚俺善訇里伊斯两命耶懂!耶噢耶!噢耶!噢耶比如你所愿你我他噢耶!爱来海!引蓝拉!噢耶让我们**人民与全世界各民族一道共同语言文字大团结起来作...

  • 佚名
    2024-05-25 08:00:00

    中华万年历的权限怎样设置?

    需要自启动和联网权限,但不推荐使用它内置的摄像,记事和程序管理功能,所以其它权限可以不给。

  • 佚名
    2024-05-25 08:00:00

    中华万年历日历闹钟怎么不响

    估计你手机没开声音,或者中华万年历的日历闹钟你没开声音,在系统设置里面去看看就好了。

  • 佚名
    2024-05-25 08:00:00

    万年历表中1900年怎么不是闰年?

    不是。判断一个年份是不是闰年,一般是看该年份是不是4的倍数,如果是,那该年就是闰年,否则就是平年。但公历年份是整百数的,就要看该年份是不是400的倍数,用该年份...

  • 佚名
    2024-05-25 08:00:00

    请问中华万年历中怎样调节音量

    声音小是没有办法调的,声音小有二种可能:一是喇叭小,二是喇叭的位置设计不合理,把声音挡住了。解决的办法您可以换一个大一些的喇叭,还可以加一个功放,这样就可以调声...

  • 佚名
    2024-05-25 08:00:00

    怎样安装中华万年历,要求app的密码

    先去应用市场上下载中华万年历软件,然后点击安装,再注册一个账号,设置好密码,就可以了。中华万年历