当前位置: 首页 > 图文教程 > 网络编程 > ASP > javascript+HTML仿造VB里的MonthView控件

ASP
深入研究“用ASP上载文件”(一)
深入研究“用ASP上载文件”(二)
一个投票系统的源程序(coveryourasp.com)
一 些 ASP 小 源 程 序
用ASP制作个性化的调查板(附源程序)
一些源程序 - 获得文件大小和字符串处理
用ASP创建日志文件(附源程序)
在一个ASP页面停留的多少时间的程序
用VB6做一个简单的文件上传组件(一)
用VB6做一个简单的文件上传组件(二)
构建你的网站新闻自动发布系统之七
实 现 滚 动 新 闻
网上“店铺”DIY(1)
网上“店铺”DIY(2)
网上“店铺”DIY(3)
负载平衡环境下的ASP会话管理(1)
负载平衡环境下的ASP会话管理(2)
FrontPage创建HTML/ASP混合页面Ⅰ
FrontPage创建HTML/ASP混合页面Ⅱ
在ASP应用中验证用户身份(1)

ASP 中的 javascript+HTML仿造VB里的MonthView控件


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 36 ::
收藏到网摘: n/a

  <html>
<head>
<title>MonthView Demo</title>
<script language=javascript>
/***********************************    程序功能:日期选择                 
    特点  :Javascript+HTML仿造VB里的MonthView控件   
    作者  :ken                    
    联系  :[email protected]       
    开发日期:2002-8-5               
\***********************************/

var languageName="cn"  //内容显示的语言 value:"cn" "en"
var currentMonth,currentYear
var nowDate,nowMonth,nowYear

d=new Date();
nowDate=d.getDate()
nowMonth=d.getMonth()
nowYear=d.getYear()

currentMonth=nowMonth
currentYear=nowYear

arrWeekCaption_cn = new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六")
arrWeekCaption_en = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
arrMonthCaption_cn= new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月")
arrMonthCaption_en= new Array("January","February","March","April","May","June","July","August","September","October","November","December")

function MonthView(){}

/*******************************            初始化控件
\*******************************/
function MonthView.initialize(){
    
    
    output ='<table cellpadding=0 cellspacing=2 style="border: 1 solid black;width:300;cursor:default" id="tblMonthView" onselectstart="return false">'
    output+='   <tr>'
    output+='      <td>'
    output+='        <table width="100%" cellpadding=0 cellspacing=0>'
    output+='            <tr style="padding-top:10;padding-bottom:10;background:menu;" id="trCaption">'
    output+='                <td><input type="button"value="3" style="height:22;font-family:webdings" onclick="MonthView.showCurrentDate(\'preview\')"></td>'
    output+='                <td align="center"><span id="spanCurrentMonth" style="font-size:12;"></span><span style="padding-left:10;font-size:12" id="spanCurrentYear"></span></td>'
    output+='                <td align="right"><input type="button"value="4" style="height:22;font-family:webdings" onclick="MonthView.showCurrentDate(\'next\')"></td>'
    output+='            '