时间控件12

if(content!=document.body){ //alert(1);
if(posleft+oInstance.Width <content.scrollWidth){ //alert(2);
//maskDiv.style.left=posleft-content.scrollLeft; //alert(postop-content.scrollTop);
//maskDiv.style.top=postop-content.scrollTop;
maskDiv.style.left=posleft-content.scrollLeft;//alert(postop-content.scrollTop);
maskDiv.style.top=postop-content.scrollTop;
}else{ //alert(3);
maskDiv.style.pixelLeft=content.offsetWidth+parseInt(content.currentStyle.paddingLeft)+parseInt(content.currentStyle.paddingRight)-oInstance.Width; //中间多那些是因为content的scrollWidth没算入padding的空间
maskDiv.style.pixelTop=postop-content.scrollTop;
}
}
//alert(maskDiv);
}else{
showMark(oInstance);
//-------这段和上面的完全一样
if(content!=document.body){ //alert(1);
if(posleft+oInstance.Width <content.scrollWidth){ //alert(2);
//maskDiv.style.left=posleft-content.scrollLeft; //alert(postop-content.scrollTop);
//maskDiv.style.top=postop-content.scrollTop;
maskDiv.style.left=posleft-content.scrollLeft;//alert(postop-content.scrollTop);
maskDiv.style.top=postop-content.scrollTop;
}else{ //alert(3);
maskDiv.style.pixelLeft=content.offsetWidth+parseInt(content.currentStyle.paddingLeft)+parseInt(content.currentStyle.paddingRight)-oInstance.Width; //中间多那些是因为content的scrollWidth没算入padding的空间
maskDiv.style.pixelTop=postop-content.scrollTop;
}
}
//-------这段和上面的完全一样
}
}
// CalendarDiv.focus();
}
}

function CalendarCellSetCss(sMode,oCell) /// Set Cell Css
{
// sMode
// 0: OnMouserOut 1: OnMouseOver
if(sMode)
{
oCell.style.border="1px solid #5589AA";
oCell.style.backgroundColor="#BCD0DE";
}
else
{
oCell.style.border="1px solid #FFFFFF";
oCell.style.backgroundColor="#FFFFFF";
}
}
function CalendarGetMaxDay(nowYear,nowMonth) /// Get MaxDay of current month
{
var nextMonth,nextYear,currDate,nextDate,theMaxDay
nextMonth=nowMonth+1;
if(nextMonth>11)
{
nextYear=nowYear+1;
nextMonth=0;
}
else
{
nextYear=nowYear;
}
currDate=new Date(nowYear,nowMonth,1);
nextDate=new Date(nextYear,nextMonth,1);
theMaxDay=(nextDate-currDate)/(24*60*60*1000);
return theMaxDay;
}
function CalendargetPos(el,ePro) /// Get Absolute Position
{
var ePos=0;
while(el!=null)
{
ePos+=el["offset"+ePro];
el=el.offsetParent;
}
return ePos;
}
function CalendargetScroll(el,ePro) /// +stz
{
var ePos=0;
while(el!=null)
{
ePos+=el["scroll"+ePro];
el=el.offsetParent;
}
return ePos;
}
function CalendarDblNum(num)
{
if(num < 10)
return "0"+num;
else
return num;
}
function CalendarCancel(oInstance) ///Cancel
{
var CalendarDiv=$(oInstance.sDIVID);
CalendarDiv.style.display="none";
showMark(oInstance);
}
function CalendarClear(oInstance)
{
oInstance.oTaget.value="";
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值