|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
国内有些大的CRM厂商的ASP就写得不错.无论是概念还是它里面用JAVASCRIPT的能力.并不是说现在的程序员用了ASP.NET来写程序就可以说自己高档了日历calendar.CSS:
.cal{
background-color:#ffffff;
}
.head{
color:#bb0000;
font-family:Arial;
font-weight:bold;
text-align:left;
}
.days{
color:#0000bb;
font-family:Arial;
font-weight:bold;
text-align:right;
}
.grey{
color:#ffffff;
font-family:Arial;
font-size:small;
text-align:right;
}
.links{
color:#ff0000;
font-family:Arial;
font-size:small;
text-align:right;
}
.today{
color:#ffffff;
background-color:#ff0000;
font-family:Arial;
font-size:small;
text-align:right;
}
calendar.js:
January,February,March,
April,May,June,July,
August,September,October,
November,December
);
vardaysOfMonth=newArray(
31,28,31,30,31,30,31,31,30,31,30,31
);
vardaysOfMonthLY=newArray(
31,29,31,30,31,30,31,31,30,31,30,31
);
vardow=newArray(Sun,Mon,Tue,Wed,Thu,Fri,Sat,
Sun,Mon,Tue,Wed,Thu,Fri);
varsize=width="50"height="30";
varborder=border="1";
functionisLeapYear(num){
if(((num%4==0)&&(num%100!=0))||(num%400==0))
returntrue;
returnfalse;
}
functionCalendarSelect(Month,Year,offset){
if(offset==null)offset=0;
if(window.changeMonth){}
else{
alert(AchangeMonth()functionhasnotbeendefined);
return;
}
if(window.changeYear){}
else{
alert(AchangeYear()functionhasnotbeendefined);
return;
}
if(window.changeDay){}
else{
alert(AchangeDay()functionhasnotbeendefined);
return;
}
varoutput=;
output+=<formname="Cal">;
output+=CalendarHead(Month,Year,true);
output+=CalendarMonth(Month,Year,offset);
output+=</form>;
returnoutput;
}
functionCalendarHead(Month,Year,Select){
varoutput=;
output+=
<tablecellspacing="0"class="cal">+
<tr><tdalign="left"width="100%"class="head">+
moy[Month-1]++Year+
</td>;
if(Select){
output+=<tdwidth="50%"align="right">+
<selectname="Month"onChange="CalMonth()">;
for(varmonth=1;month<=12;month++){
output+=<optionvalue="+month+";
if(month==Month)output+=selected;
output+=>+moy[month-1]+</option>;
}
output+=</select>+
<selectname="Year"onChange="CalYear();">;
for(varyear=1900;year<=2100;year++){
output+=<optionvalue="+year+";
if(year==Year)output+=selected;
output+=>+year+</option>;
}
output+=</select>;
}
output+=</td></tr></table>;
returnoutput;
}
functionCalendarMonth(M,Y,offset){
M--;
if(offset==null)offset=0;
firstDay=newDate(Y,M,1);
startDay=firstDay.getDay();
if(startDay<offset)startDay+=7;
vardays=daysOfMonth;
if(isLeapYear(Y))days=daysOfMonthLY;
varoutput=;
output+=
<table+border+cellpadding="0"class="cal"><tr>;
for(vari=0;i<7;i++)
output+=<td+size+class="days">+
dow[i+offset]+</td>;
output+=</tr><tr>;
varcolumn=0;
varlastM=M-1;
if(lastM==-1)lastM=11;
for(vari=0+offset;i<startDay;i++,column++)
output+=<td+size+class="grey">+
(days[lastM]-startDay+i+1)+</td>;
for(vari=1;i<=days[M];i</p>因为现在数据库都使用标准的SQL语言对数据库进行管理,所以如果是标准SQL语言,两者基本上都可以通用的。SQLServer还有更多的扩展,可以用存储过程,数据库大小无极限限制。 |
|