⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calendar.js

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 JS
字号:

document.write("<iframe id=\"oCalendar\" name=\"oCalendar\" frameborder=0 src=\""+ $InstallDir +"calendar/calendar.asp\" style=\"display:none;position:absolute;z-index:9999;\"></iframe>");
document.onclick = HideCalendar;


function ShowCalendar(oEventName, oNextEventName, StartDate, LastDate, ArrWeek, ArrDefineDate, Field1, Field2){
	
	var oCalendar = document.getElementById("oCalendar");
	var wCalendar = window.frames.oCalendar;
	var oEvent = document.getElementById(oEventName);
	if(!oEvent){ alert("控件对象不存在"); return;}
	var oField1, oField2
	oField1 = document.getElementById(Field1);
	if(!oField1){ alert("输入控件对象不存在"); return;}
	if(Field2!=""){
		oField2 = document.getElementById(Field2);
		if(!oField2){ alert("输入控件对象2不存在"); return;}
	}
	
	var PositionX=0, PositionY=0;
	var BodyScrollTop= document.body.scrollTop, BodyScrollLeft = document.body.scrollLeft;
	var TempObject = oEvent;
	while(TempObject && TempObject.tagName != "BODY"){
		PositionX += TempObject.offsetTop;
		PositionY += TempObject.offsetLeft;
		TempObject = TempObject.offsetParent;
	}
	oCalendar.height = 173;
	oCalendar.width = 144;	
	
	wCalendar.oEventName = oEventName;
	wCalendar.oNextEventName = oNextEventName;
	wCalendar.StartDate = StartDate;
	wCalendar.LastDate = LastDate;
	wCalendar.ArrWeek = ArrWeek;
	wCalendar.ArrDefineDate = ArrDefineDate;
	wCalendar.Field1 = oField1;
	wCalendar.Field2 = oField2;

    var tempHeight = 0+oEvent.height==0?20:oEvent.height;
	tempHeight = parseInt(tempHeight)>0?parseInt(tempHeight):20;
	oCalendar.style.top = (PositionX)<(document.body.clientHeight-oCalendar.height+BodyScrollTop)?(PositionX+tempHeight):(PositionX-oCalendar.height)
	oCalendar.style.left = (document.body.clientWidth-(PositionY-BodyScrollLeft)>=oCalendar.width)?PositionY:(document.body.clientWidth-oCalendar.width-5);

	wCalendar.InitCalendar();
	
	oCalendar.style.display = "block";	
		
}
function HideCalendar(){
	var oCalendar = document.getElementById("oCalendar");
	oCalendar.style.display = "none";
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -