LittleBeeInventory/Scripts/My97DatePicker/WdatePicker.js

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*****************************************************
 * My97 DatePicker Ver 3.0.1
 * BLOG: http://blog.csdn.net/my97/
 * MAIL: smallcarrot@163.com
 ****************************************************/
$position=0;
$dpPath='';
var $dp=null;if(!window.$){$ = function(){var elements = new Array();for (var i=0;i<arguments.length;i++){var element=arguments[i];
if (typeof element=='string'){element=document.getElementById(element);}if (arguments.length==1){return element;}elements.push(element);}return elements;}}
function $getClientWidthHeight(w){var win=w||window;if(win.document.documentElement&&win.document.documentElement.scrollTop){return{'width':win.document.documentElement.clientWidth,'height':win.document.documentElement.clientHeight};}
else if(win.document.body){return{'width':win.document.body.clientWidth,'height':win.document.body.clientHeight};}}
function $getScroll(w){var win=w||window;
if(win.document.documentElement&&win.document.documentElement.scrollTop){return{'top':win.document.documentElement.scrollTop,'left':win.document.documentElement.scrollLeft};}
else if(win.document.body){return{'top':win.document.body.scrollTop,'left':win.document.body.scrollLeft};}}
function $getAbsM(topWin)
{if(topWin==null){topWin=top;}
var leftM=0;var topM=0;
var tempWin=window;
while(tempWin!=topWin){var ifs=tempWin.parent.document.getElementsByTagName('iframe');
for(var i=0;i<ifs.length;i++){try{if(ifs[i].contentWindow==tempWin.window){var rc=$getBoundingClientRect(ifs[i]);
leftM+=rc.left;
topM+=rc.top;
break;}}
catch(e){continue;}}
tempWin=tempWin.parent;}
return{'leftM':leftM,'topM':topM};}
function $getBoundingClientRect(obj){if(navigator.product=='Gecko'){var objWin=null;
var top=obj.offsetTop;
var left=obj.offsetLeft;
var right=obj.offsetWidth;
var bottom=obj.offsetHeight;
while(obj=obj.offsetParent){
top+=obj.offsetTop;left+=obj.offsetLeft;
if(obj.tagName.toLowerCase()=="body"){objWin=obj.ownerDocument.defaultView;}}
var theScroll=$getScroll(objWin);
left-=theScroll.left;
top-=theScroll.top;
right+=left;
bottom+=top;
return{'left':left,'top':top,'right':right,'bottom':bottom};}
else{return obj.getBoundingClientRect();}}
if(navigator.product=='Gecko')
{Window.prototype.attachEvent = function(sType,fHandler){var shortTypeName=sType.replace(/on/,"");
fHandler._ieEmuEventHandler=function(e){window.event=e;	return fHandler();	};
this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false);};Document.prototype.attachEvent=function(sType,fHandler){var shortTypeName=sType.replace(/on/,"");fHandler._ieEmuEventHandler=function(e){window.event=e;return fHandler();};
this.addEventListener(shortTypeName,fHandler._ieEmuEventHandler,false);};
Document.prototype.createStyleSheet=function(cssPath){var head=document.getElementsByTagName('HEAD').item(0);
var style=document.createElement('link');
style.href=cssPath;
style.rel='stylesheet';
style.type='text/css';
head.appendChild(style);};
HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){switch(where){case"beforeBegin":
this.parentNode.insertBefore(parsedNode,this);
break;
case"afterBegin":
this.insertBefore(parsedNode,this.firstChild);
break;
case"beforeEnd":
this.appendChild(parsedNode);
后面还有 102 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。