A very wonderful calendar program

Source: Internet
Author: User

We often need some of the Web projects used in the calendar, such a script to write trouble, not powerful enough, now tofu to everyone
Provides a powerful calendar program that uses a full client-side JS script to run faster.
Let's take a look at the following, there is any need to improve the place, first see the effect of it! Calendar Demo
<HTML>
<HEAD>
<TITLE> Tofu Calendar </TITLE>
<style type= "Text/css" >
. Normal{background: #ffffff}
. Today {font-weight:bold; BACKGROUND: #6699cc}
. Satday{color:green}
. sunday{color:red}
. Days {Font-weight:bold}
</STYLE>
<script language= "JavaScript" >
In Chinese month, if you want to display the English month, revise the following comment
/*var months = new Array ("January?," February?, "March",
"April", "may", "June", "July", "August", "September",
"October", "November", "December");
var months = new Array ("January", "February", "March",
"April", "May", "June", "July", "August", "September",
"October", "November", "December");
var daysinmonth = new Array (31, 28, 31, 30, 31, 30, 31, 31,
30, 31, 30, 31);
If you want to display English, revise the following comment
/*var days = new Array ("Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday");
var days = new Array ("Day", "one", "two", "three"),
"Four", "five", "six");
function getdays (month, year) {
The following code is to determine whether the current is a leap year
if (1 = month)
Return ((0 = year% 4) && (0!= (year% 100)) | |
(0 = year% 400)? 29:28;
Else
return Daysinmonth[month];
}

function Gettoday () {
Get today's year, month, day
This.now = new Date ();
This.year = This.now.getFullYear ();
This.month = This.now.getMonth ();
This.day = This.now.getDate ();
}


Today = new Gettoday ();

function Newcalendar () {

Today = new Gettoday ();
var parseyear = parseint (document.all.year
[Document.all.year.selectedindex].text);
var newcal = new Date (Parseyear,
Document.all.month.selectedIndex, 1);
var day =-1;

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.