所属类别:SQL Server
文章作者:ITPUB论坛
特别推荐:免费发布信息 承包关键词~~抢爆了!HOT!
var myC_x,myC_y; var myC_timeset=null,myC_timeset1=null; var divObj=null; var inputName; function myCalendar() //构建对象 { var myDate = new Date(); this.year = myDate.getFullYear(); this.month = myDate.getMonth()+1; this.date = myDate.getDate(); this.format="yyyy-mm-dd"; this.style = myStyle(1); this.show = createCalendar; this.input = createInput; } function myStyle(num) //设置样式 { if(!numisNaN(num)){alert('参数不对,采用默认样式!');num=1;} var style = new Array(); style[1]=".week{background-color:#DfDfff;font-size:12px;width:140px;}"+".ds{width:140px;font-size:12px;cursor:hand}"+".mover{border:1px solid black;background-color:#f4f4f4;}"+".move1{border:1px solid #5d5d5d;background-color:#f4f4f4;color:#909eff;font-size:12px}"+".tit{background-color:#909EFF;width:140px;font-size:12px;color:white;cursor:default}"+".cs{position:absolute;border:1px solid #909eff;width:142px;left:0px;top:0px;z-index:9999;}"+".shadow{position:absolute;left:0px;top:0px;font-family: Arial Black;font-size:50px;color:#d4d4d4;z-index:1;text-align:center;}"; document.write(""); document.write(style[num]); document.write(""); } function createCalendar() { var week = new Array('日','一','二','三','四','五','六'); document.write(""); //创建头部 document.write("7348"); //创建星期条目 document.write(""); for(i=0;i<7;i++) document.write(""+week[i]+""); 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(""); //显示日期 showDate(this.year,this.month); myC_div.style.display='none'; } function getValue(obj,value) { eval(obj).value=parseInt(myC_Top.cells[2].innerText)+"-"+parseInt(myC_Top.cells[3].innerText)+"-"+value; } function showDate(year,month) { var myDate = new Date(year,month-1,1); var today = new Date(); var day = myDate.getDay(); var length = new Array(31,30,31,30,31,30,31,31,30,31,30,31); length[1] = ((year%4==0)&&(year%100!=0)(year%400==0))?29:28; for(i=0;i12){month=1;year++;}showDate(year,month);} function cutYear(){var year = parseInt(myC_Top.cells[2].innerText);var month = parseInt(myC_Top.cells[3].innerText);year--;showDate(year,month);} function cutMonth(){var year = parseInt(myC_Top.cells[2].innerText);var month = parseInt(myC_Top.cells[3].innerText);month--;if(month<1){month=12;year--;}showDate(year,month);} function divS(obj) { if(obj!=divObj) { obj.style.backgroundColor="#909eff"; obj.style.color='black'; } if(divObj!=null) { divObj.style.backgroundColor=''; divObj.style.color=''; } divObj = obj; } function divShow(obj) { if (myC_timeset!=null) clearTimeout(myC_timeset); obj.style.display='block'; } function divHidden(obj){myC_timeset=window.setTimeout(function(){obj.style.display='none'},500);} function createyear(year,obj)//创建年份选择 { var ystr; var oDiv; ystr=""; ystr+="上翻"; for(i=year-10;i"+i+"年"; else ystr+=""+i+"年"; ystr+="下翻"; ystr+=""; oDiv = myC.parentElement.nextSibling; oDiv.innerHTML=''; oDiv.innerHTML = ystr; showDiv(oDiv,obj.offsetTop+obj.offsetHeight,obj.offsetLeft); } function createmonth(month,obj)//创建月份选择 { var mstr; var oDiv; mstr=""; for(i=1;i<13;i++) if (month==i) mstr+=""+ i+"月"; elsemstr+=""+ i+"月"; mstr+=""; oDiv = myC.parentElement.nextSibling; oDiv.innerHTML=''; oDiv.innerHTML = mstr; showDiv(oDiv,obj.offsetTop+obj.offsetHeight,obj.offsetLeft); } function showDiv(obj,top,left) { obj.style.pixelTop=top; obj.style.pixelLeft=left; } function myCMove(obj) { if(event.button==1) { var X = obj.clientLeft; var Y = obj.clientTop; obj.style.pixelLeft= X+(event.x-myC_x); obj.style.pixelTop= Y+(event.y-myC_y); window.status=myC_y; } } function showDiv2(obj) { inputName=obj.name; var e=obj; var ot = obj.offsetTop; var ol=obj.offsetLeft; while(obj=obj.parentElement){ot+=obj.offsetTop;ol+=obj.offsetLeft;} myC_div.style.pixelTop=ot+e.offsetHeight; myC_div.style.pixelLeft=ol; myC_div.style.display="block"; } function createInput(name) {myC_div.style.display='none'; document.write(""); } // --------------End --------------------- var myCalendar=new myCalendar; myCalendar.year=2006; myCalendar.show(); myCalendar.input("txt1");
相关信息· asp数据连接方法
· 字符串表达式计算C
· linux内核IOCTL网络控制框架实现分析
· 过敏性皮肤怎么办 过敏性皮肤的治疗秋日节气美国永康大赠送
32343
56060
