- 关 键 词:
- css
//************* 插入日期单元格 **************/
this.insertBodyCell=function(theRow,j,day,targetObject){
var theCell=theRow.insertCell(j);
if(j==0) var theBgColor="#FF9999";
else var theBgColor="#FFFFFF";
if(day==calendar.currentDate[2]) var theBgColor="#CCCCCC";
if(day==calendar.today[2]) var theBgColor="#99FFCC";
theCell.bgColor=theBgColor;
theCell.innerText=day;
theCell.align="center";
theCell.width=35;
theCell.style.CSSText="border:1 solid #CCCCCC;cursor:hand;";
theCell.onmouseover=function(){
theCell.bgColor="#FFFFCC";
theCell.style.CSSText="border:1 outset;cursor:hand;";
}
theCell.onmouseout=function(){
theCell.bgColor=theBgColor;
theCell.style.CSSText="border:1 solid #CCCCCC;cursor:hand;";
}
theCell.onmousedown=function(){
theCell.bgColor="#FFFFCC";
theCell.style.CSSText="border:1 inset;cursor:hand;";
}
theCell.onclick=function(){
if(calendar.currentDate[1].length<2) calendar.currentDate[1]="0"+calendar.currentDate[1];
if(day.toString().length<2) day="0"+day;
calendar.sltDate=calendar.currentDate[0]+"-"+calendar.currentDate[1]+"-"+day;
calendar.target.value=calendar.sltDate;
calendar.hide();
}
}
/************** 取得月份的第一天为星期几 *********************/
this.getFirstDay=function(theYear, theMonth){
var firstDate = new Date(theYear,theMonth-1,1);
return firstDate.getDay();
}
/************** 取得月份共有几天 *********************/URL:http://www.qqread.com/javascript/e240780.html进入讨论组讨论。
this.insertBodyCell=function(theRow,j,day,targetObject){
var theCell=theRow.insertCell(j);
if(j==0) var theBgColor="#FF9999";
else var theBgColor="#FFFFFF";
if(day==calendar.currentDate[2]) var theBgColor="#CCCCCC";
if(day==calendar.today[2]) var theBgColor="#99FFCC";
theCell.bgColor=theBgColor;
theCell.innerText=day;
theCell.align="center";
theCell.width=35;
theCell.style.CSSText="border:1 solid #CCCCCC;cursor:hand;";
theCell.onmouseover=function(){
theCell.bgColor="#FFFFCC";
theCell.style.CSSText="border:1 outset;cursor:hand;";
}
theCell.onmouseout=function(){
theCell.bgColor=theBgColor;
theCell.style.CSSText="border:1 solid #CCCCCC;cursor:hand;";
}
theCell.onmousedown=function(){
theCell.bgColor="#FFFFCC";
theCell.style.CSSText="border:1 inset;cursor:hand;";
}
theCell.onclick=function(){
if(calendar.currentDate[1].length<2) calendar.currentDate[1]="0"+calendar.currentDate[1];
if(day.toString().length<2) day="0"+day;
calendar.sltDate=calendar.currentDate[0]+"-"+calendar.currentDate[1]+"-"+day;
calendar.target.value=calendar.sltDate;
calendar.hide();
}
}
/************** 取得月份的第一天为星期几 *********************/
this.getFirstDay=function(theYear, theMonth){
var firstDate = new Date(theYear,theMonth-1,1);
return firstDate.getDay();
}
/************** 取得月份共有几天 *********************/URL:http://www.qqread.com/javascript/e240780.html进入讨论组讨论。
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
相关专题
- JavaScript教程 (577次浏览)
- 用javascript实现浮点数的截取小数位数,并 (514次浏览)
- 用javascript操作xml (335次浏览)
- javascript表单之间的数据传递 (327次浏览)
- JavaScript自定义模式对话框 (140次浏览)
- 用javascript的正则表达式来验证Email地址是 (135次浏览)
- 实用javaScript技术总结(1):屏蔽类 (119次浏览)
- asp结合javascript,xml,sqlserver制作的无 (110次浏览)
- 107条Javascript的常用语句 (101次浏览)
- Javascript实例教程(1) 目录 (74次浏览)



