WebRoot/js/Calendar4.js
(开头部分) 15KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// <div>
// <input type="text" name="time1" id="time1" onclick="MyCalendar.SetDate(this)" value="2006-8-1" />
// <input type="text" name="time2" id="time2" value="2006-8-1" /><input name="" type="button"
// onclick="MyCalendar.SetDate(this,document.getElementById('time2'))" value="选择" />
// </div>
function L_calendar(){}
L_calendar.prototype={
_VersionInfo:"Version:1.0 作者: lingye",
Moveable:true,
NewName:"",
insertId:"",
ClickObject:null,
InputObject:null,
InputDate:null,
IsOpen:false,
MouseX:0,
MouseY:0,
GetDateLayer:function(){
return window.L_DateLayer;
},
L_TheYear:new Date().getFullYear(), //定义年的变量的初始值
L_TheMonth:new Date().getMonth()+1,//定义月的变量的初始值
L_WDay:new Array(39),//定义写日期的数组
MonHead:new Array(31,28,31,30,31,30,31,31,30,31,30,31), //定义阳历中每个月的最大天数
GetY:function(){
var obj;
if (arguments.length > 0){
obj==arguments[0];
}
else{
obj=this.ClickObject;
}
if(obj!=null){
var y = obj.offsetTop;
while (obj = obj.offsetParent) y += obj.offsetTop;
return y;}
else{return 0;}
},
GetX:function(){
var obj;
if (arguments.length > 0){
obj==arguments[0];
}
else{
obj=this.ClickObject;
}
if(obj!=null){
var y = obj.offsetLeft;
while (obj = obj.offsetParent) y += obj.offsetLeft;
return y;}
else{return 0;}
},
CreateHTML:function(){
var htmlstr="";
htmlstr+="<div id=\"L_calendar\">\r\n";
htmlstr+="<span id=\"SelectYearLayer\" style=\"z-index: 9999;position: absolute;top: 3; left: 19;display: none\"></span>\r\n";
htmlstr+="<span id=\"SelectMonthLayer\" style=\"z-index: 9999;position: absolute;top: 3; left: 78;display: none\"></span>\r\n";
htmlstr+="<div id=\"L_calendar-year-month\"><div id=\"L_calendar-PrevM\" onclick=\"parent."+this.NewName+".PrevM()\" title=\"前一月\"><b><</b></div><div id=\"L_calendar-year\" onmouseover=\"style.backgroundColor='#FFD700'\" onmouseout=\"style.backgroundColor='white'\" onclick=\"parent."+this.NewName+".SelectYearInnerHTML('"+this.L_TheYear+"')\"></div><div id=\"L_calendar-month\" onmouseover=\"style.backgroundColor='#FFD700'\" onmouseout=\"style.backgroundColor='white'\" onclick=\"parent."+this.NewName+".SelectMonthInnerHTML('"+this.L_TheMonth+"')\"></div><div id=\"L_calendar-NextM\" onclick=\"parent."+this.NewName+".NextM()\" title=\"后一月\"><b>></b></div></div>\r\n";
后面还有 292 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
