Simulate the MonthView control in VB using Javascript + HTML

Source: Internet
Author: User

<Html>
<Head>
<Title> MonthView Demo </title>
<Script language = javascript>
/************************************ Program functions: date Selection
Features: The MonthView control in VB is simulated using Javascript and HTML.
Author: ken
Contact: boboshu@21cn.com
Development Date: 2002-8-5
***********************************/

Var languageName = "cn" // language of the content display 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 ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Saturday ")
ArrWeekCaption_en = new Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat ")
ArrMonthCaption_cn = new Array ", "August September", "August October", "August November", "August December ")
ArrMonthCaption_en = new Array ("January", "February", "March", "April", "May", "June", "July", "August ", "September", "October", "November", "December ")

Function MonthView (){}

/******************************** Initialize the control
*******************************/
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 (ext) "> </td>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.