|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
由于ASP还是一种Script语言所没除了大量使用组件外,没有办法提高其工作效率。它必须面对即时编绎的时间考验,同时我们还不知其背后的组件会是一个什么样的状况;程序|分页<!--#includevirtual="/share/config.asp"-->
<html>
<head>
<title>UntitledDocument</title>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312">
<styletype="text/CSS">
<!--
td{
font-size:12px;
}
-->
</style>
</head>
<center>
<body>
<tablewidth="400"border="0"cellspacing="0"cellpadding="0">
<formname="form1"method="post"action="showpage_test.asp">
<tr>
<tdwidth="112"height="20"><divalign="center">肇端日期</div></td>
<tdwidth="288"height="20"><inputname="startTime"type="text"id="startTime"size="20"readonly></td>
</tr>
<tr>
<tdheight="20"><divalign="center">停止日期</div></td>
<tdheight="20"><inputname="endTime"type="text"id="endTime"size="20"readonly></td>
</tr>
<tr>
<tdheight="20"colspan="2"><divalign="center">
<inputtype="submit"name="Submit"value="查询">
<inputtype="submit"name="Submit2"value="我要赞扬">
</div></td>
</tr>
</form>
</table>
<br>
<tablewidth="100%"border="0"cellpadding="0"cellspacing="0">
<tr>
<td><divalign="center">
<%
constMaxPerPage=1
dimtotalPut
dimCurrentPage
dimTotalPages
dimi,j
ifrequest("page")=""then
currentPage=1
else
currentPage=cint(request("page"))在表单中先强迫只能输出数字
ifIsNumeric(request("page"))then
currentPage=cint(request("page"))
else
Response.write"这里提醒只能输出数字"
endif
endif
%>
<%
SetConn=Server.CreateObject("adodb.Connection")
Conn.OpenApplication("connStr")
SetRs=server.createobject("adodb.recordset")
startTime=request("startTime")
endTime=request("endTime")
ifstartTime""andendTime""then
endTime=dateadd("d",1,endTime)
sql="select*fromd_leave_wordwherely_Datebetween"&startTime&"and"&endTime&""
endTime=dateadd("d",-1,endTime)
else
sql="select*fromd_leave_word"
endif
GoPage="showpage_test.asp"
Condition="&startTime="&startTime&"&endTime="&endTime&""
rs.opensql,conn,1,1
ifrs.eofandrs.bofthen
response.write"<palign=center><fontcolor=#000066>还没任何信息!</font></p>"
else
totalPut=rs.recordcount
ifcurrentpage<1then
currentpage=1
endif
if(currentpage-1)*MaxPerPage>totalputthen
if(totalPutmodMaxPerPage)=0then
currentpage=totalPutMaxPerPage
else
currentpage=totalPutMaxPerPage+1
endif
endif
ifcurrentPage=1then
showContent
showpagetotalput,MaxPerPage,GoPage
elseif(currentPage-1)*MaxPerPage<totalPutthen
rs.move(currentPage-1)*MaxPerPage
dimbookmark
bookmark=rs.bookmark
showContent
showpagetotalput,MaxPerPage,GoPage
else
currentPage=1
showContent
showpagetotalput,MaxPerPage,GoPage
endif
endif
rs.close
setrs=nothing
conn.close
setconn=nothing
%>
<%
subshowContent
dimi
i=0
%>
<tablewidth="96%"border="0"cellpadding="0"cellspacing="1"bgcolor="#4D90AB">
<trbgcolor="#D7F3FF">
<tdwidth="80"height="21"><divalign="center">赞扬种别</div></td>
<tdwidth="124"height="21"><divalign="center">赞扬内容</div></td>
<tdwidth="60"height="21"><divalign="center">赞扬日期</div></td>
<tdwidth="60"height="21"><divalign="center">赞扬形态</div></td>
<tdwidth="127"height="21"><divalign="center">处置定见</div></td>
<tdwidth="60"height="21"><divalign="center">处置工夫</div></td>
<tdwidth="40"><divalign="center">检察</div></td>
</tr>
<%dowhilenotrs.eof%>
<trbgcolor="#FFFFFF">
<tdwidth="80"height="20"><divalign="center"><%=HTMLdecode(rs("Type_Name"))%></div></td>
<tdheight="20"><divalign="left">
<%iflen(HTMLdecode(rs("Content")))>9thenresponse.writeleft(HTMLdecode(rs("Content")),9)&"..."elseresponse.writeHTMLdecode(rs("Content"))endif%>
</div></td>
<tdwidth="60"height="20"><divalign="center"><%=rs("ly_Date")%></div></td>
<tdwidth="60"height="20"><divalign="center">
<%ifHTMLdecode(rs("Re_Content"))""thenresponse.write"已复兴"elseresponse.write"处置中"endif%>
</div></td>
<tdheight="20"><divalign="left">
<%iflen(rs("Re_Content"))>9thenresponse.writeleft(rs("Re_Content"),9)&"..."elseresponse.writers("Re_Content")endif%>
</div></td>
<tdwidth="60"height="20"><divalign="center"><%=HTMLdecode(rs("Re_Date"))%></div></td>
<tdwidth="40"><divalign="center"><ahref="leave_word.asp?sType=检察&id=<%=rs("id")%>">检察</a></div></td>
</tr>
<%i=i+1
ifi>=MaxPerPagethenexitdo
rs.movenext
loop%>
</table>
<%endsub%>
</div></td>
</tr>
</table>
</body></center>
</html>
<%
functionshowpage(totalnumber,maxperpage,filename)
dimn
iftotalnumbermodmaxperpage=0then
n=totalnumbermaxperpage
else
n=totalnumbermaxperpage+1
endif
response.write"<formmethod=Postaction="&GoPage&"?z=1"&Condition&">"
response.write"<palign=leftvAlign=bottom>>>信息分页"
response.write"<palign=centervAlign=center>"
ifCurrentPage<2then
response.write"<fontcolor=#648ECE>首页上一页</font>"
else
response.write"<ahref="&filename&"?page=1"&Condition&">首页</a>"
response.write"<ahref="&filename&"?page="&CurrentPage-1&""&Condition&">上一页</a>"
endif
ifn-currentpage<1then
response.write"<fontcolor=#648ECE>下一页尾页</font>"
else
response.write"<ahref="&filename&"?page="&CurrentPage+1&""&Condition&">下一页</a>"
response.write"<ahref="&filename&"?page="&n&""&Condition&">尾页</a>"
endif
response.write"页次:<strong><fontcolor=red>"&CurrentPage&"</font>/"&n&"</strong>页"
response.write"共<b>"&totalnumber&"</b>个信息<b>"&maxperpage&"</b>个信息/页"
response.write"转到:<inputclass=TextBorderstyle=FONT-SIZE:8pt;width:20;HEIGHT:18px;type=textname=pagesize=2maxlength=10class=smallInputvalue="¤tpage&">"
response.write"<inputalt=页面跳转name=submittype=submitvalue=提交>"
response.write"</span></p></form>"
endfunction
%>
<scriptlanguage=javascript>
functiononlyNum()
{if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=105)))
event.returnValue=false;}
</script>
<!--<scriptlanguage="javascript"src="...js"></script>用来挪用JS文件-->
<scriptlanguage="javascript">
<!--
//==============参数设定部分============================
varbMoveable=true;//设置日历是不是能够拖动
var_VersionInfo="Version:2006"//版本信息
//===============WEB页面显现部分======================
varstrFrame;//寄存日历层的HTML代码h
document.writeln(<iframeid=meizzDateLayerAuthor=wayxframeborder=0style="position:absolute;width:150;height:220;z-index:9998;display:none"></iframe>);
strFrame=<style>;
strFrame+=INPUT.button{BORDER-RIGHT:#ff99001pxsolid;BORDER-TOP:#ff99001pxsolid;BORDER-LEFT:#ff99001pxsolid;;
strFrame+=BORDER-BOTTOM:#ff99001pxsolid;BACKGROUND-COLOR:#fff8ec;font-family:宋体;};
strFrame+=TD{FONT-SIZE:9pt;font-family:宋体;};
strFrame+=</style>;
strFrame+=<scr+ipt>;
strFrame+=vardatelayerx,datelayery;/*寄存日历控件的鼠标地位*/;
strFrame+=varbDrag;/*标志是不是入手下手拖动*/;
strFrame+=functiondocument.onmousemove()/*在鼠标挪动事务中,假如入手下手拖动日历,则挪动日历*/;
strFrame+={if(bDrag&&window.event.button==1);
strFrame+={varDateLayer=parent.document.all.meizzDateLayer.style;;
strFrame+=DateLayer.posLeft+=window.event.clientX-datelayerx;/*因为每次挪动今后鼠标地位都恢复为初始的地位,因而写法与div中分歧*/;
strFrame+=DateLayer.posTop+=window.event.clientY-datelayery;}};
strFrame+=functionDragStart()/*入手下手日历拖动*/;
strFrame+={varDateLayer=parent.document.all.meizzDateLayer.style;;
strFrame+=datelayerx=window.event.clientX;;
strFrame+=datelayery=window.event.clientY;;
strFrame+=bDrag=true;};
strFrame+=functionDragEnd(){/*停止日历拖动*/;
strFrame+=bDrag=false;};
strFrame+=</scr+ipt>;
strFrame+=<divstyle="z-index:9999;position:absolute;left:0;top:0;"onselectstart="returnfalse"><spanid=tmpSelectYearLayerAuthor=wayxstyle="z-index:9999;position:absolute;top:3;left:19;display:none"></span>;
strFrame+=<spanid=tmpSelectMonthLayerAuthor=wayxstyle="z-index:9999;position:absolute;top:3;left:78;display:none"></span>;
strFrame+=<tableborder=1cellspacing=0cellpadding=0width=142height=160bordercolor=#ff9900bgcolor=#ff9900Author="wayx">;
strFrame+=<trAuthor="wayx"><tdwidth=142height=23Author="wayx"bgcolor=#FFFFFF><tableborder=0cellspacing=1cellpadding=0width=140Author="wayx"height=23>;
strFrame+=<tralign=centerAuthor="wayx"><tdwidth=16align=centerbgcolor=#ff9900style="font-size:12px;cursor:hand;color:#ffffff";
strFrame+=title="向前翻1月"Author=meizz><bAuthor=meizz><</b>;
strFrame+=</td><tdwidth=60align=centerstyle="font-size:12px;cursor:default"Author=meizz;
strFrame+=;
strFrame+=title="点击这里选择年份"><spanAuthor=meizzid=meizzYearHead></span></td>;
strFrame+=<tdwidth=48align=centerstyle="font-size:12px;cursor:default"Author=meizz;
strFrame+=;
strFrame+=title="点击这里选择月份"><spanid=meizzMonthHeadAuthor=meizz></span></td>;
strFrame+=<tdwidth=16bgcolor=#ff9900align=centerstyle="font-size:12px;cursor:hand;color:#ffffff";
strFrame+=title="向后翻1月"Author=meizz><bAuthor=meizz>></b></td></tr>;
strFrame+=</table></td></tr>;
strFrame+=<trAuthor="wayx"><tdwidth=142height=18Author="wayx">;
strFrame+=<tableborder=1cellspacing=0cellpadding=0bgcolor=#ff9900+(bMoveable?:);
strFrame+=BORDERCOLORLIGHT=#FF9900BORDERCOLORDARK=#FFFFFFwidth=140height=20Author="wayx"style="cursor:+(bMoveable?move:default)+">;
strFrame+=<trAuthor="wayx"align=centervalign=bottom><tdstyle="font-size:12px;color:#FFFFFF"Author=meizz>日</td>;
strFrame+=<tdstyle="font-size:12px;color:#FFFFFF"Author=meizz>一</td><tdstyle="font-size:12px;color:#FFFFFF"Author=meizz>二</td>;
strFrame+=<tdstyle="font-size:12px;color:#FFFFFF"Author=meizz>三</td><tdstyle="font-size:12px;color:#FFFFFF"Author=meizz>四</td>;
strFrame+=<tdstyle="font-size:12px;color:#FFFFFF"Author=meizz>五</td><tdstyle="font-size:12px;color:#FFFFFF"Author=meizz>六</td></tr>;
strFrame+=</table></td></tr>;
strFrame+=<trAuthor="wayx"><tdwidth=142height=120Author="wayx">;
strFrame+=<tableborder=1cellspacing=2cellpadding=0BORDERCOLORLIGHT=#FF9900BORDERCOLORDARK=#FFFFFFbgcolor=#fff8ecwidth=140height=120Author="wayx">;
varn=0;for(j=0;j<5;j++){strFrame+=<tralign=centerAuthor="wayx">;for(i=0;i<7;i++){
strFrame+=<tdwidth=20height=20id=meizzDay+n+style="font-size:12px"Author=meizzonclick=parent.meizzDayClick(this.innerText,0)></td>;n++;}
strFrame+=</tr>;}
strFrame+=<tralign=centerAuthor="wayx">;
for(i=35;i<39;i++)strFrame+=<tdwidth=20height=20id=meizzDay+i+style="font-size:12px"Author=wayx></td>;
strFrame+=<tdcolspan=3align=rightAuthor=meizz><spanonclick=parent.closeLayer()style="font-size:12px;cursor:hand";
strFrame+=Author=meizztitle="+_VersionInfo+"><u>封闭</u></span></td></tr>;
strFrame+=</table></td></tr><trAuthor="wayx"><tdAuthor="wayx">;
strFrame+=<tableborder=0cellspacing=1cellpadding=0width=100%Author="wayx"bgcolor=#FFFFFF>;
strFrame+=<trAuthor="wayx"><tdAuthor=meizzalign=left><inputAuthor=meizztype=buttonclass=buttonvalue="<<"title="向前翻1年";
strFrame+=style="font-size:12px;height:20px"><inputAuthor=meizzclass=buttontitle="向前翻1月"type=button;
strFrame+=value="<"style="font-size:12px;height:20px"></td><td;
strFrame+=Author=meizzalign=center><inputAuthor=meizztype=buttonclass=buttonvalue=明天;
strFrame+=title="以后日期"style="font-size:12px;height:20px;cursor:hand"></td><td;
strFrame+=Author=meizzalign=right><inputAuthor=meizztype=buttonclass=buttonvalue=">";
strFrame+=title="向后翻1月"class=buttonstyle="font-size:12px;height:20px"><input;
strFrame+=Author=meizztype=buttonclass=buttonvalue=">>"title="向后翻1年";
strFrame+=style="font-size:12px;height:20px"></td>;
strFrame+=</tr></table></td></tr></table></div>;
window.frames.meizzDateLayer.document.writeln(strFrame);
window.frames.meizzDateLayer.document.close();//办理ie进度条不停止的成绩
//=============WEB页面显现部分=========================
varoutObject;
varoutButton;//点击的按钮
varoutDate="";//寄存工具的日期
varodatelayer=window.frames.meizzDateLayer.document.all;//寄存日历工具
functionsetday(tt,obj)file://主调函数
{
if(arguments.length>2){alert("对不起!传进本控件的参数太多!");return;}
if(arguments.length==0){alert("对不起!您没有传回本控件任何参数!");return;}
vardads=document.all.meizzDateLayer.style;
varth=tt;
varttop=tt.offsetTop;file://TT控件的定位点高
varthei=tt.clientHeight;file://TT控件自己的高
vartleft=tt.offsetLeft;file://TT控件的定位点宽
varttyp=tt.type;file://TT控件的范例
while(tt=tt.offsetParent){ttop+=tt.offsetTop;tleft+=tt.offsetLeft;}
dads.top=(ttyp=="image")?ttop+thei:ttop+thei+6;
dads.left=tleft;
outObject=(arguments.length==1)?th:obj;
outButton=(arguments.length==1)?null:th;//设定内部点击的按钮
//依据以后输出框的日期显现日历的年代
varreg=/^(d+)-(d{1,2})-(d{1,2})$/;
varr=outObject.value.match(reg);
if(r!=null){
r[2]=r[2]-1;
vard=newDate(r[1],r[2],r[3]);
if(d.getFullYear()==r[1]&&d.getMonth()==r[2]&&d.getDate()==r[3]){
outDate=d;//保留内部传进的日期
}
elseoutDate="";
meizzSetDay(r[1],r[2]+1);
}
else{
outDate="";
meizzSetDay(newDate().getFullYear(),newDate().getMonth()+1);
}
dads.display=;
event.returnValue=false;
}
varMonHead=newArray(12);file://界说阳历中每月的最年夜天数
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;
varmeizzTheYear=newDate().getFullYear();file://界说年的变量的初始值
varmeizzTheMonth=newDate().getMonth()+1;file://界说月的变量的初始值
varmeizzWDay=newArray(39);file://界说写日期的数组
functiondocument.onclick()file://恣意点击时封闭该控件//ie6的情形能够由上面的切换核心处置取代
{
with(window.event)
{if(srcElement.getAttribute("Author")==null&&srcElement!=outObject&&srcElement!=outButton)
closeLayer();
}
}
functiondocument.onkeyup()//按Esc键封闭,切换核心封闭
{
if(window.event.keyCode==27){
if(outObject)outObject.blur();
closeLayer();
}
elseif(document.activeElement)
if(document.activeElement.getAttribute("Author")==null&&document.activeElement!=outObject&&document.activeElement!=outButton)
{
closeLayer();
}
}
functionmeizzWriteHead(yy,mm)file://往head中写进以后的年与月
{
odatelayer.meizzYearHead.innerText=yy+"年";
odatelayer.meizzMonthHead.innerText=mm+"月";
}
functiontmpSelectYearInnerHTML(strYear)file://年份的下拉框
{
if(strYear.match(/D/)!=null){alert("年份输出参数不是数字!");return;}
varm=(strYear)?strYear:newDate().getFullYear();
if(m<1000||m>9999){alert("年份值不在1000到9999之间!");return;}
varn=m-10;
if(n<1000)n=1000;
if(n+26>9999)n=9974;
vars="<selectAuthor=meizzname=tmpSelectYearstyle=font-size:12px"
s+="onblur=document.all.tmpSelectYearLayer.style.display="none""
s+="onchange=document.all.tmpSelectYearLayer.style.display="none";"
s+="parent.meizzTheYear=this.value;parent.meizzSetDay(parent.meizzTheYear,parent.meizzTheMonth)>
";
varselectInnerHTML=s;
for(vari=n;i<n+26;i++)
{
if(i==m)
{selectInnerHTML+="<optionAuthor=wayxvalue="+i+"selected>"+i+"年"+"</option>
";}
else{selectInnerHTML+="<optionAuthor=wayxvalue="+i+">"+i+"年"+"</option>
";}
}
selectInnerHTML+="</select>";
odatelayer.tmpSelectYearLayer.style.display="";
odatelayer.tmpSelectYearLayer.innerHTML=selectInnerHTML;
odatelayer.tmpSelectYear.focus();
}
functiontmpSelectMonthInnerHTML(strMonth)file://月份的下拉框
{
if(strMonth.match(/D/)!=null){alert("月份输出参数不是数字!");return;}
varm=(strMonth)?strMonth:newDate().getMonth()+1;
vars="<selectAuthor=meizzname=tmpSelectMonthstyle=font-size:12px"
s+="onblur=document.all.tmpSelectMonthLayer.style.display="none""
s+="onchange=document.all.tmpSelectMonthLayer.style.display="none";"
s+="parent.meizzTheMonth=this.value;parent.meizzSetDay(parent.meizzTheYear,parent.meizzTheMonth)>
";
varselectInnerHTML=s;
for(vari=1;i<13;i++)
{
if(i==m)
{selectInnerHTML+="<optionAuthor=wayxvalue="+i+"selected>"+i+"月"+"</option>
";}
else{selectInnerHTML+="<optionAuthor=wayxvalue="+i+">"+i+"月"+"</option>
";}
}
selectInnerHTML+="</select>";
odatelayer.tmpSelectMonthLayer.style.display="";
odatelayer.tmpSelectMonthLayer.innerHTML=selectInnerHTML;
odatelayer.tmpSelectMonth.focus();
}
functioncloseLayer()file://这个层的封闭
{
document.all.meizzDateLayer.style.display="none";
}
functionIsPinYear(year)file://判别是不是闰闰年
{
if(0==year%4&&((year%100!=0)||(year%400==0)))returntrue;elsereturnfalse;
}
functionGetMonthCount(year,month)file://闰年仲春为29天
{
varc=MonHead[month-1];if((month==2)&&IsPinYear(year))c++;returnc;
}
functionGetDOW(day,month,year)file://求某天的礼拜几
{
vardt=newDate(year,month-1,day).getDay()/7;returndt;
}
functionmeizzPrevY()file://往前翻Year
{
if(meizzTheYear>999&&meizzTheYear<10000){meizzTheYear--;}
else{alert("年份超越局限(1000-9999)!");}
meizzSetDay(meizzTheYear,meizzTheMonth);
}
functionmeizzNextY()file://今后翻Year
{
if(meizzTheYear>999&&meizzTheYear<10000){meizzTheYear++;}
else{alert("年份超越局限(1000-9999)!");}
meizzSetDay(meizzTheYear,meizzTheMonth);
}
functionmeizzToday()file://TodayButton
{
vartoday;
meizzTheYear=newDate().getFullYear();
meizzTheMonth=newDate().getMonth()+1;
today=newDate().getDate();
file://meizzSetDay(meizzTheYear,meizzTheMonth);
if(outObject){
outObject.value=meizzTheYear+"-"+meizzTheMonth+"-"+today;
}
closeLayer();
}
functionmeizzPrevM()file://往前翻月份
{
if(meizzTheMonth>1){meizzTheMonth--}else{meizzTheYear--;meizzTheMonth=12;}
meizzSetDay(meizzTheYear,meizzTheMonth);
}
functionmeizzNextM()file://今后翻月份
{
if(meizzTheMonth==12){meizzTheYear++;meizzTheMonth=1}else{meizzTheMonth++}
meizzSetDay(meizzTheYear,meizzTheMonth);
}
functionmeizzSetDay(yy,mm)file://次要的写程序**********
{
meizzWriteHead(yy,mm);
file://设置以后年代的大众变量为传进值
meizzTheYear=yy;
meizzTheMonth=mm;
for(vari=0;i<39;i++){meizzWDay[i]=""};file://将显现框的内容全体清空
varday1=1,day2=1,firstday=newDate(yy,mm-1,1).getDay();file://某月第一天的礼拜几
for(i=0;i<firstday;i++)meizzWDay[i]=GetMonthCount(mm==1?yy-1:yy,mm==1?12:mm-1)-firstday+i+1//上个月的最初几天
for(i=firstday;day1<GetMonthCount(yy,mm)+1;i++){meizzWDay[i]=day1;day1++;}
for(i=firstday+GetMonthCount(yy,mm);i<39;i++){meizzWDay[i]=day2;day2++}
for(i=0;i<39;i++)
{varda=eval("odatelayer.meizzDay"+i)file://誊写新的一个月的日期礼拜分列
if(meizzWDay[i]!="")
{
//初始化边框
da.borderColorLight="#FF9900";
da.borderColorDark="#FFFFFF";
if(i<firstday)//上个月的部分
{
da.innerHTML="<b><fontcolor=gray>"+meizzWDay[i]+"</font></b>";
da.title=(mm==1?12:mm-1)+"月"+meizzWDay[i]+"日";
da.onclick=Function("meizzDayClick(this.innerText,-1)");
if(!outDate)
da.style.backgroundColor=((mm==1?yy-1:yy)==newDate().getFullYear()&&
(mm==1?12:mm-1)==newDate().getMonth()+1&&meizzWDay[i]==newDate().getDate())?
"#FFD700":"#e0e0e0";
else
{
da.style.backgroundColor=((mm==1?yy-1:yy)==outDate.getFullYear()&&(mm==1?12:mm-1)==outDate.getMonth()+1&&
meizzWDay[i]==outDate.getDate())?"#00ffff":
(((mm==1?yy-1:yy)==newDate().getFullYear()&&(mm==1?12:mm-1)==newDate().getMonth()+1&&
meizzWDay[i]==newDate().getDate())?"#FFD700":"#e0e0e0");
//将选中的日期显现为凹下往
if((mm==1?yy-1:yy)==outDate.getFullYear()&&(mm==1?12:mm-1)==outDate.getMonth()+1&&
meizzWDay[i]==outDate.getDate())
{
da.borderColorLight="#FFFFFF";
da.borderColorDark="#FF9900";
}
}
}
elseif(i>=firstday+GetMonthCount(yy,mm))//下个月的部分
{
da.innerHTML="<b><fontcolor=gray>"+meizzWDay[i]+"</font></b>";
da.title=(mm==12?1:mm+1)+"月"+meizzWDay[i]+"日";
da.onclick=Function("meizzDayClick(this.innerText,1)");
if(!outDate)
da.style.backgroundColor=((mm==12?yy+1:yy)==newDate().getFullYear()&&
(mm==12?1:mm+1)==newDate().getMonth()+1&&meizzWDay[i]==newDate().getDate())?
"#FFD700":"#e0e0e0";
else
{
da.style.backgroundColor=((mm==12?yy+1:yy)==outDate.getFullYear()&&(mm==12?1:mm+1)==outDate.getMonth()+1&&
meizzWDay[i]==outDate.getDate())?"#00ffff":
(((mm==12?yy+1:yy)==newDate().getFullYear()&&(mm==12?1:mm+1)==newDate().getMonth()+1&&
meizzWDay[i]==newDate().getDate())?"#FFD700":"#e0e0e0");
//将选中的日期显现为凹下往
if((mm==12?yy+1:yy)==outDate.getFullYear()&&(mm==12?1:mm+1)==outDate.getMonth()+1&&
meizzWDay[i]==outDate.getDate())
{
da.borderColorLight="#FFFFFF";
da.borderColorDark="#FF9900";
}
}
}
else//本月的部分
{
da.innerHTML="<b>"+meizzWDay[i]+"</b>";
da.title=mm+"月"+meizzWDay[i]+"日";
da.onclick=Function("meizzDayClick(this.innerText,0)");//给td付与onclick事务的处置
//假如是以后选择的日期,则显现亮蓝色的背景;假如是以后日期,则显现暗黄色背景
if(!outDate)
da.style.backgroundColor=(yy==newDate().getFullYear()&&mm==newDate().getMonth()+1&&meizzWDay[i]==newDate().getDate())?
"#FFD700":"#e0e0e0";
else
{
da.style.backgroundColor=(yy==outDate.getFullYear()&&mm==outDate.getMonth()+1&&meizzWDay[i]==outDate.getDate())?
"#00ffff":((yy==newDate().getFullYear()&&mm==newDate().getMonth()+1&&meizzWDay[i]==newDate().getDate())?
"#FFD700":"#e0e0e0");
//将选中的日期显现为凹下往
if(yy==outDate.getFullYear()&&mm==outDate.getMonth()+1&&meizzWDay[i]==outDate.getDate())
{
da.borderColorLight="#FFFFFF";
da.borderColorDark="#FF9900";
}
}
}
da.style.cursor="hand"
}
else{da.innerHTML="";da.style.backgroundColor="";da.style.cursor="default"}
}
}
functionmeizzDayClick(n,ex)file://点击显现框拔取日期,主输出函数*************
{
varyy=meizzTheYear;
varmm=parseInt(meizzTheMonth)+ex;//ex暗示偏移量,用于选择上个月份和下个月份的日期
//判别月份,并举行对应的处置
if(mm<1){
yy--;
mm=12+mm;
}
elseif(mm>12){
yy++;
mm=mm-12;
}
if(mm<10){mm="0"+mm;}
if(outObject)
{
if(!n){//outObject.value="";
return;}
if(n<10){n="0"+n;}
outObject.value=yy+"-"+mm+"-"+n;file://注:在这里你能够输入改成你想要的格局
closeLayer();
}
else{closeLayer();alert("您所要输入的控件工具其实不存在!");}
}
//-->
</script>
asp可以轻松地实现对页面内容的动态控制,根据不同的浏览者,显示不同的页面内容。而浏览者一点觉察不出来,就像为他专门制作的页面一样。使用各种各样的组件,asp可以完成无比强大的功能。 |
|