<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Calendar</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>
TD {
FONT-SIZE: 12px; FONT-FAMILY: arial; TEXT-ALIGN: center
}
TD.dt {
FONT-SIZE: 11px; FONT-FAMILY: arial; TEXT-ALIGN: center
}
A {
COLOR: blue; text-decoration: none;
}
A:hover {
COLOR: red; text-decoration: none;
}
A.active {
COLOR: blue; text-decoration: none;
}
A.link {
COLOR: blue; text-decoration: none;
}
A.visited {
COLOR: blue; text-decoration: none;
}
</STYLE>
<SCRIPT language=JavaScript>
//后添加的东东,用于iframe
var fld1,fld2,fldname;
var wp=window.parent;
var cf=wp.document.getElementById("CACalFrame");
fldname = getUrlValue();
var isFirst = fldname["isFirst"];
fld1 = wp.parent.document.getElementById(fldname["fld1"]);
if (fldname["fld2"] != "undefined") {
fld2 = wp.parent.document.getElementById(fldname["fld2"]);
}
function getUrlValue() {
var url=location.search;
var Request = new Object();
if(url.indexOf("?")!=-1) {
var str = url.substr(1) //去掉?号
strs = str.split("&");
for(var i=0;i<strs.length;i++) {
Request[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
}
return Request;
}
function resizeCalendar(){
if (ie.toString() == "1") {
cf.width=274;cf.height=173;}
else {
cf.width=274;cf.height=173;}
}
//////////////////////////////////////
<!-- Begin
var formReturn = window.name;
var n = (document.layers) ? 1:0
var ie = (document.all) ? 1:0
var n6 = (document.getElementById&&!document.all) ? 1:0
var agt = navigator.userAgent.toLowerCase();
var mac = (agt.indexOf("mac")!=-1);
var monthnames = new Array("01","02","03","04","05","06","07","08","09","10","11","12");
var linkcount=0;
var calCode1
function addlink(month, day, href) {
var entry = new Array(3);
entry[0] = month;
entry[1] = day;
entry[2] = href;
this[linkcount++] = entry;
}
Array.prototype.addlink = addlink;
linkdays = new Array();
monthdays = new Array(12);
monthdays[0]=31;
monthdays[1]=28;
monthdays[2]=31;
monthdays[3]=30;
monthdays[4]=31;
monthdays[5]=30;
monthdays[6]=31;
monthdays[7]=31;
monthdays[8]=30;
monthdays[9]=31;
monthdays[10]=30;
monthdays[11]=31;
var previousMonth = ''
var nextMonth = ''
var yearsFuture = 1
function makeMonth(which){
gotoMonth = which;
todayDate=new Date();
year=todayDate.getYear();
var curmonth = todayDate.getMonth();
var curyear = todayDate.getYear();
var yesterday = (todayDate.getDate())-1;
var nowday = todayDate.getDate();
curyear += (curyear < 1900) ? 1900 : 0
if (gotoMonth==0){
month = todayDate.getMonth();
nextMonth = month+1
previousMonth = month-1;
} else {
month = gotoMonth;
nextMonth = month+1;
previousMonth = month-1;
}
if (month > 11){
monthMultiplier = Math.floor(month/12)
month = month-(12*monthMultiplier)
year = year+monthMultiplier
}
year = year % 100;
year = ((year < 50) ? (2000 + year) : (1900 + year));
if (((year % 4 == 0) && !(year % 100 == 0)) || (year % 400 == 0)) monthdays[1]=29;
else(monthdays[1] = 28);
if (month==11){
month2 = 0;
year2 = year+1; }
else {
month2 = month+1;
year2 = year;
}
var firstOfMonth = new Date (year, month, 1);
var startspaces = firstOfMonth.getDay();
calCode1 = "<table bgColor=white border=0 cellPadding=2 cellSpacing=1 width='135'>";
calCode1 = calCode1 + "<tr bgcolor='#006eb6'>";
if (previousMonth >= todayDate.getMonth())
calCode1 = calCode1 + "<td height='15'><a href='#' onclick='makeMonth("+previousMonth+");return false;'><font color='white'><<</font></a></td>";
else
calCode1 = calCode1+"<td height='15'><font color='#2F4098'><<</font></td>";
calCode1 = calCode1 + "<td align='center' nowrap style='COLOR: white; FONT-SIZE: 11px' width='99%'>" + year + "." + monthnames[month] + "</td>";
calCode1 = calCode1 + "<td><a href='#' onclick='makeMonth("+nextMonth+");return false;'><font color='white'>>></font></a></td></tr>";
calCode1 = calCode1 + "</table><table bgColor='#EEEDED' border='0' cellPadding='0' cellSpacing='0' width='133'>";
calCode1 = calCode1 + "<tr>";
//calCode1 = calCode1 + "<tr align='center' valign='bottom'>";
calCode1 = calCode1 + "<td width='20' height='15'><font color='red'>日</font></td>";
calCode1 = calCode1 + "<td width='20'>一</td>";
calCode1 = calCode1 + "<td width='20'>二</td>";
calCode1 = calCode1 + "<td width='20'>三</td>";
calCode1 = calCode1 + "<td width='20'>四</td>";
calCode1 = calCode1 + "<td width='20'>五</td>";
calCode1 = calCode1 + "<td width='20'><font color='red'>六</font></td>";
calCode1 = calCode1 + "</tr>";
calCode1 = calCode1 + "<tr>";
calCode1 = calCode1 + "<td height='1' bgColor='#cccccc' colSpan='7'></td>";
calCode1 = calCode1 + "</tr>";
calCode1 = calCode1 + "<tr>";
calCode1 = calCode1 + "<td height='7' bgColor='#ffffff' colSpan='7'></td>";
calCode1 = calCode1 + "</tr>";
calCode1 = calCode1 + "<table bgColor='#ffffff' border='0' cellPadding='1' cellSpacing='1' height='100' width='131' background='../ima/bg_logo.gif'>"
calCode1 = calCode1 + "<tr>";
for (s=0;s<startspaces;s++) {
calCode1 = calCode1 + "<td height='15'> </td>";
}
count=1;
while (count <= 35) {
for (b = startspaces;b<7;b++) {
linktrue=false;
//calCode1 = calCode1 + "<td align='right' class='dt'>";
if (count <= monthdays[month]) {
if (year==curyear&&month == curmonth && count <= yesterday)
calCode1 = calCode1 + "<td align='right' class='dt' height='15'><font color='#999999'>" + count + "</font>";
else
{
if (count == nowday && month == todayDate.getMonth() && year == todayDate.getYear())
calCode1 = calCode1 + "<td align='right' class='dt' bgcolor='#E1E9F4' height='15'><a href='#' onclick='setDates("+month+","+count+","+year+");return false;'><font color='red'>"+count+"</font>";
else
calCode1 = calCode1 + "<td align='right' class='dt' height='15'><a href='#' onclick='setDates("+month+","+count+","+year+");return false;'>"+count;
calCode1 = calCode1 + "</a>";
}
}
else {
calCode1 = calCode1 + "<td align='right' class='dt'> ";
}
calCode1 = calCode1 + "</td>";
count++;
}
calCode1 = calCode1 + "</tr>";
calCode1 = calCode1 + "<tr>";
startspaces=0;
}
calCode1 = calCode1 + "</tr></table>"; // leave the </p> for IEMac
calCode2 = "<table border=0 cellPadding=2 cellSpacing=1 width='135'>";
calCode2 = calCode2 + "<tr bgcolor='#006eb6'>";
if (previousMonth >= todayDate.getMonth())
calCode2 = calCode2 + "<td height='15'><a href='#' onclick='makeMonth("+previousMonth+");return false;'><font color='white'><<</font></a></td>";
else
calCode2 = calCode2+"<td height='15'><font color='#2F4098'><<</font></td>";
var firstOfMonth2 = new Date (year2, month2, 1);
var startspaces2 = firstOfMonth2.getDay();
calCode2 = calCode2 + "<td align='center' nowrap style='COLOR: white; FONT-SIZE: 11px' width='99%' height='15'>" + year2 + "." + monthnames[month2] + "</td>";
calCode2 = calCode2 + "<td height='15'><a href='#' onclick='makeMonth("+nextMonth+");return false;'><font color='white'>>></font></a></td></tr>";
calCode2 = calCode2 + "</table><table bgColor='#EEEDED' border='0' cellPadding='0' cellSpacing='0' width='133'>";
calCode2 = calCode2 + "<tr>";
calCode2 = calCode2 + "<td width='19' height='15'><font color='red'>日</font></td>";
calCode2 = calCode2 + "<td width='19'>一</td>";
calCode2 = calCode2 + "<td width='19'>二</td>";
calCode2 = calCode2 + "<td width='19'>三</td>";
calCode2 = calCode2 + "<td width='19'>四</td>";
calCode2 = calCode2 + "<td width='19'>五</td>";
calCode2 = calCode2 + "<td width='19'><font color='red'>六</font></td>";
calCode2 = calCode2 + "</tr>";
calCode2 = calCode2 + "<tr>";
calCode2 = calCode2 + "<td height='1' bgColor='#cccccc
没有合适的资源?快使用搜索试试~ 我知道了~
常用日期选择代码,适合做订票系统
共4个文件
htm:2个
js:1个
gif:1个
5星 · 超过95%的资源 需积分: 12 19 下载量 143 浏览量
2008-09-18
11:53:22
上传
评论
收藏 5KB RAR 举报
温馨提示
提供方便快捷的日期选择功能,可实现点击日历上的日期达到日期选择功能,试用方便,可以在JSP ASP PHP等各种网站中嵌套
资源推荐
资源详情
资源评论
收起资源包目录
1.rar (4个子文件)
1
time.htm 498B
images
b_time.gif 236B
js
calendar.js 2KB
newCalendar.htm 11KB
共 4 条
- 1
资源评论
- l8y8h8sohu2012-08-14在框架页面内不能调用日期。。。
dyyq2003
- 粉丝: 1
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功