|
|
|
再送大家一个礼物!!
作者:佚名 来源:一亩三分地 点击: 日期:2007-03-22 |
|
A VBS CLASS calendar
calendar.vbs
<%
'*************************************************************************************************
'VBScript 日历 组件
'
'赋值:
' Mnth 日历月份
' Yr 日历年份
' FontSize 字体大小
' Columns 月份显示列数
' FontFace 字体样式
' FontColour 字体颜色
' FillColour 星期背景颜色
' BorderColour 边框颜色
' BackgroundColour 日历背景颜色
' FullYearLink 全年月份连接
'
'取值:
' MonthCal 月份表格
' YearCal 年份表格
'方法:
' LoadMonthArray 私有方法
'*************************************************************************************************
%>
<Script LANGUAGE=JavaScript>
//定义整个年份查看连接函数
function showyearcal(link, year) {
if (link.indexOf('?') > 0)
link = link + '&year=' + year
else
link = link + '?year=' + year
calwin=window.open( link, 'calwin', 'toolbar=yes, scrollbars=yes, status=yes, width=680, height=480' )
if (typeof(calwin.focus) != "undefined") {
calwin.focus()
}
}
//定义月份查看连接函数
function changemonth(moveby) {
document.calform.calmonth.value = document.calform.calmonth.value - 0 + moveby;
document.calform.submit();
}
function changeyear(moveby) {
document.calform.calyear.value = document.calform.calyear.value - 0 + moveby;
document.calform.submit();
}
</script>
<style>
td.day {font-family:arial;font-size:8pt;color:black}
</style>
<%
'定义日历类
class calendar
private M, Y, D, WeekNo, MonthArray, FSize, FFace, FColour, BorderCol, FillCol, BGCol, BigCol, SingleMonth, FYLink, Cols, cStyleSheet
'声明私有变量
property let Mnth(Month)
if Month >= 1 and Month <= 12 then
M = Month
end if
end property
'给月份赋值
property let Yr(Year)
if Year > 1 and Year < 9999 then
Y = Int(Year)
end if
end property
'给年份赋值
property let FontSize(FS)
if FS >= 1 and FS <= 7 then
FSize = FS
end if
end property
'给字体大小赋值
property let Columns(C)
select case C
case 1,2,3,4,6,12
Cols = C
case else
Cols = 4
end select
end property
'给月份行数赋值
property let FontFace(FF)
if FF <> "" then
FFace = FF
end if
end property
'给字体样式赋值
property let FontColour(FC)
if FC <> "" then
FColour = FC
end if
end property
'给字体颜色赋值
property let FillColour(FC)
if FC <> "" then
FillCol = FC
end if
end property
'给星期背景色赋值
property let BorderColour(BC)
if BC <> "" then
BorderCol = BC
end if
end property
'给边框颜色赋值
property let BackgroundColour(BGC)
if BGC <> "" then
BgCol = BGC
end if
end property
'给日历背景色赋值
property let FullYearLink(FYL) FYLink = FYL end property
'给全年连接赋值
property let StyleSheet(SS) cStyleSheet = SS end property
'给样式赋值
'初始化日历类
private Sub Class_Initialize
Mnth = Month(Now)
Yr = Year(Now) '给年份赋值
FFace = "arial" '给字体样式赋值
FSize = 2 '给字体大小赋值
FColour = "black" '给字体颜色赋值
BorderCol = "lightgrey" &
|
|
|
|
【文章评论】
【收藏本文】
【推荐好友】
【打印本文】
【论坛讨论】 |
相关文章: |
|
|
文章评论:(条) |
|
|
|
|
责任编辑:一分 声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。 |
|