"); document.write(" .ds_font td,span { font: normal 12px 宋体; color: #00000。js怎么写日历( 二 )。" />

js怎么写日历( 二 )


{ var week=new Array('日' , '一' , '二' , '三' , '四' , '五' , '六'); document.write("<style type=text/css>"); document.write(" .ds_font td,span { font: normal 12px 宋体; color: #000000; }"); document.write(" .ds_border { border: 1px solid #000000; cursor: hand; background-color: #DDDDDD }"); document.write(" .ds_border2 { border: 1px solid #000000; cursor: hand; background-color: #DDDDDD }"); document.write("</style>"); document.write(""); document.write(""); document.write(""); document.write(" "); document.write(" "); document.write(" "); document.write(" <<"); document.write(" <"); document.write(" "+this.year+""+this.month+""); document.write(" >"); document.write(" >>"); document.write(" "); document.write(" "); document.write(" "); document.write(" "); for(i=0;i<7;i++)document.write(" "+week[i]+""); document.write(" "); document.write(" "); document.write(" "); for(i=0;i<6;i++) { document.write(" ");for(j=0;j<7;j++) document.write(" "); document.write(" "); } document.write(" "); document.write(" 【关闭】"); document.write(" "); document.write(""); dateShow(document.all("DS_"+this.inputName).nextSibling.nextSibling.childNodes[0].childNodes[2],this.year,this.month)}function subYear(obj) //减小 。
3.想用js做日历怎么弄1.写一个获取当前时间的脚本
2.写一个获取事件源绝对坐标的脚本
3.写一个日历生成脚本 , 根据年(闰年)月(大小月)周(周一到周日)生成日历
4.当事件源(一般是文本框)获得焦点的时候 , 触发获取绝对坐标的事件 , 然后生成当前月的日历 , 将此日历的坐标用脚本移动到文本框下方
5.生成日历的时候 , 给所有日添加返回事件 , 把当前选中的年月日反馈
6.用脚本把反馈回来的日期信息 , 写入事件源控件
7.网上日历控件一大堆 , 最好别自己写 , 很容易蛋疼的
4.日历用js如何实现加入到你的页面中 js/Calendar.js 这是控件的路径Calendar.js 这个东西应该可以找的到吧 , onclick="SelectDate(this)" 这是调用的方法 。
5.求一个用JS编写的简单日历<meta ; charset=gb2312" />日历演示<script language="javascript">/***************** 由于字数限制 , 请下载附件看使用说明.*******如果您使用本日历控件 请保留该信息 谢谢! *********** ******************/function Calendar(objName) { this.style = {borderColor : "#909eff" ,  //边框颜色headerBackColor : "#909EFF" ,  //表头背景颜色headerFontColor : "#ffffff" ,  //表头字体颜色bodyBarBackColor : "#f4f4f4" ,  //日历标题背景色bodyBarFontColor : "#000000" ,  //日历标题字体色bodyBackColor : "#ffffff" ,  //日历背景色bodyFontColor : "#000000" ,  //日历字体色 bodyHolidayFontColor : "#ff0000" ,  //假日字体色watermarkColor : "#d4d4d4" ,  //背景水印色moreDayColor : "#cccccc" };this.showMoreDay = false; //是否显示上月和下月的日期this.Obj = objName; this.date = null;this.mouseOffset = null;this.dateInput = null;this.timer = null; };Calendar.prototype.toString = function(){ var str = this.getStyle();str += 'calendar" style="display:none;" onselectstart="return false" oncontextmenu="return false" id="Calendar">\n';str += '';str += this.getHeader();str += this.getBody(); str += '';return str;};Calendar.prototype.getStyle = function(){var str = '<style type="text/css">\n';str += '.calendar{position:absolute;width:140px!important;width /**/:142px;height:184px!important;height /**/:174px;background-color:'+this.style.bodyBackColor+';border:1px solid ' + this.style.borderColor + ';left:0px;top:0px;z-index:9999;}\n';str += '.cdrHeader{background-color:'+ this.style.headerBackColor +';width:140px;height:22px;font-size:12px;color:'+this.style.headerFontColor+';}\n';str += '.cdrWatermark{position:absolute;left:0px;top:55px;width:140px;font-family: Arial Black;font-size:50px;color:'+this.style.watermarkColor+';z-index:1;text-align:center;}\n';str += '.cdrBodyBar{background-color:' + this.style.bodyBarBackColor + ';font-size:12px;color:' + this.style.bodyBarFontColor + ';width:140px;height:20px;}\n';str += '.cdrBody{width:140px;height:122px!important; height /**/:110px;font-size:12px;cursor:pointer;color:' + this.style.bodyFontColor + ';}\n';str += '.dayOver{height:16px;padding:0px;border:1px solid black;background-color:#f4f4f4;}\n';str += '.dayOut{padding:1px;border:none;height:16px;}\n';str += '.menuOver{background-color:'+this.style.headerBackColor+';color:'+this.style.headerFontColor+';font-size:12px;}\n';str += '.headerOver{border:1px solid black;background-color:#f4f4f4;color:black;cursor:default;}\n';str += '.cdrMenu{font-size:12px;border:1px solid #000000;background-color:#ffffff;cursor:default;width:100%}\n';str += 'html>body #Calendar{width:142px;174px;}';str += '</style>\n'; return str;};Calendar.prototype.getHeader = function(){var str = '\n';str += '