我的一亩三分地 我就喜欢!
13fen  设为主页
 收藏本站
 
当前位置: > 一亩三分地:首页 > 网络学院 > 网络编程 > ASP专区 > Asp客户端/系统 > 再送大家一个礼物!!
热门文章排行
热门文章排行 手推车”功能的实现(10-07)
八大法则防范ASP网站漏洞(10-23)
ASP教程十一、调试ASP脚本(10-23)
在JSP中访问数据库大全(10-23)
虚机服务中常见Asp.Net低级错误一览(03-21)
精采文章排行
精采文章排行 ASP.NET实现抓取网页中的链接(11-15)
ASP连接数据库的11种方法(11-10)
如何动态创建网页的RSS内容摘要(11-10)
ASP网站漏洞及入侵防范方法(11-10)
ASP自定义函数:对字符串正则替换(11-10)
技术专题推荐
网管论坛交流
 

再送大家一个礼物!! 

作者:佚名   来源:一亩三分地   点击:   日期: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"      &

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【论坛讨论

   相关文章:
·ASP中巧用Response属性 ·第六课:ASP脚本循环语句
·在 Web 页上使用条件数值格式 ·连接数据库查询手册(不仅仅适用于asp)
·警惕"给你的FileSystemObject对象加把锁" ·用ASP做全文检索

   文章评论:(条)
  
 请留名: 匿名评论   点击查看所有评论 网管论坛
 

  责任编辑:一分  声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。