Meeting/Html/css/ScrollPic1003.js

(开头部分) 7KB

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

var zhangxu={$:function(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}},isIE:navigator.appVersion.indexOf("MSIE")!=-1?true:false,addEvent:function(l,i,I){if(l.attachEvent){l.attachEvent("on"+i,I)}else{l.addEventListener(i,I,false)}},delEvent:function(l,i,I){if(l.detachEvent){l.detachEvent("on"+i,I)}else{l.removeEventListener(i,I,false)}},readCookie:function(O){var o="",l=O+"=";if(document.cookie.length>0){var i=document.cookie.indexOf(l);if(i!=-1){i+=l.length;var I=document.cookie.indexOf(";",i);if(I==-1)I=document.cookie.length;o=unescape(document.cookie.substring(i,I))}};return o},writeCookie:function(i,l,o,c){var O="",I="";if(o!=null){O=new Date((new Date).getTime()+o*3600000);O="; expires="+O.toGMTString()};if(c!=null){I=";domain="+c};document.cookie=i+"="+escape(l)+O+I},readStyle:function(I,l){if(I.style[l]){return I.style[l]}else if(I.currentStyle){return I.currentStyle[l]}else if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(I,null);return i.getPropertyValue(l)}else{return null}}};
function ScrollPic(scrollContId,arrLeftId,arrRightId,dotListId){
	this.scrollContId=scrollContId;
	this.arrLeftId=arrLeftId;
	this.arrRightId=arrRightId;
	this.dotListId=dotListId;
	this.dotClassName="dotItem";
	this.dotOnClassName="dotItemOn";
	this.dotObjArr=[];
	this.pageWidth=0;
	this.frameWidth=0;
	this.speed=10;
	this.space=30;
	this.pageIndex=0;
	this.autoPlay=true;
	this.autoPlayTime=5;
	var _autoTimeObj,_scrollTimeObj,_state="ready";
	this.stripDiv=document.createElement("DIV");
	this.listDiv01=document.createElement("DIV");
	this.listDiv02=document.createElement("DIV");
	if(!ScrollPic.childs){ScrollPic.childs=[]};
	this.ID=ScrollPic.childs.length;
	ScrollPic.childs.push(this);
	this.initialize=function(){
		if(!this.scrollContId){
			throw new Error("必须指定scrollContId.");
			return};
			this.scrollContDiv=zhangxu.$(this.scrollContId);
			if(!this.scrollContDiv){
				throw new Error("scrollContId不是正确的对象.(scrollContId = \""+this.scrollContId+"\")");
				return};
				this.scrollContDiv.style.width=this.frameWidth+"px";
				this.scrollContDiv.style.overflow="hidden";
				this.listDiv01.innerHTML=this.listDiv02.innerHTML=this.scrollContDiv.innerHTML;
				this.scrollContDiv.innerHTML="";
				this.scrollContDiv.appendChild(this.stripDiv);
				this.stripDiv.appendChild(this.listDiv01);
				this.stripDiv.appendChild(this.listDiv02);
				this.stripDiv.style.overflow="hidden";
				this.stripDiv.style.zoom="1";
				this.stripDiv.style.width="32766px";
				this.listDiv01.style.cssFloat="left";
				this.listDiv02.style.cssFloat="left";
				if(this.arrLeftId){
				this.arrLeftObj=zhangxu.$(this.arrLeftId);
				if(this.arrLeftObj){
				zhangxu.addEvent(this.arrLeftObj,"mousedown",Function("ScrollPic.childs["+this.ID+"].rightMouseDown()"));
				zhangxu.addEvent(this.arrLeftObj,"mouseup",Function("ScrollPic.childs["+this.ID+"].rightEnd()"));
				zhangxu.addEvent(this.arrLeftObj,"mouseout",Function("ScrollPic.childs["+this.ID+"].rightEnd()"))}};
					if(this.arrRightId){
					this.arrRightObj=zhangxu.$(this.arrRightId);
					if(this.arrRightObj){zhangxu.addEvent(this.arrRightObj,"mousedown",Function("ScrollPic.childs["+this.ID+"].leftMouseDown()"));
					zhangxu.addEvent(this.arrRightObj,"mouseup",Function("ScrollPic.childs["+this.ID+"].leftEnd()"));
					zhangxu.addEvent(this.arrRightObj,"mouseout",Function("ScrollPic.childs["+this.ID+"].leftEnd()"))}};
						if(this.dotListId){
						this.dotListObj=zhangxu.$(this.dotListId);
						if(this.dotListObj){
						var pages=Math.round(this.listDiv01.offsetWidth/this.frameWidth+0.4),i,tempObj;
						for(i=0;i<pages;i++){
							tempObj=document.createElement("span");
后面还有 79 行代码,购买后查看完整代码

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

AI 解读

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

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