时间: 2021-07-31 作者:daque
} btncell.onmouseout=function(){ btncell.style.csstext="width:100%;border:1 outset;background-color:buttonface;"; } // btncell.onmousedown=function(){ // btncell.style.csstext="width:100%;border:1 inset;background-color:#f0f0f0;"; // } btncell.onmouseup=function(){ btncell.style.csstext="width:100%;border:1 outset;background-color:#f0f0f0;"; } btncell.onclick=function(){ btncell.blur(); } return btncell; } this.setdefaultdate=function(){ var dftdate=new date(); calendar.today[0]=dftdate.getyear(); calendar.today[1]=dftdate.getmonth()+1; calendar.today[2]=dftdate.getdate(); }
/****************** show calendar *********************/ this.show=function(targetobject,defaultdate,sourceobject){ if(targetobject==undefined) { alert("未树立目的对像. \n本领: atcalendar.show(obj 目的对像,string 默许日子,obj 点击对像);\n\n目的对像:接收日子归来值的对像.\n默许日子:方法为\"yyyy-mm-dd\",缺省为当天日子.\n点击对像:点击这个对像弹出calendar,默许为目的对像.\n"); return false; } else calendar.target=targetobject; if(sourceobject==undefined) calendar.source=calendar.target; else calendar.source=sourceobject;
var firstday; var cells=new array();