MyException - 我的异常网
当前位置:我的异常网» JavaScript » js图片滚动有关问题 [100分]

js图片滚动有关问题 [100分](2)

www.myexceptions.net  网友分享于:2013-04-10  浏览:24次

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";
if (!+ [1, ]) {
this.listDiv01.style.styleFloat = "left";
this.listDiv02.style.styleFloat = "left";
} else {
this.listDiv01.style.cssFloat = "left";
this.listDiv02.style.cssFloat = "left";
};
zhangxu.addEvent(this.scrollContDiv, "mouseover", Function("ScrollPic.childs[" + this.ID + "].stop()"));
zhangxu.addEvent(this.scrollContDiv, "mouseout", Function("ScrollPic.childs[" + this.ID + "].play()"));
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");
this.dotListObj.appendChild(tempObj);
this.dotObjArr.push(tempObj);
if (i == this.pageIndex) {
tempObj.className = this.dotClassName
} else {
tempObj.className = this.dotOnClassName
};
tempObj.title = "第" + (i + 1) + "页";
zhangxu.addEvent(tempObj, "click", Function("ScrollPic.childs[" + this.ID + "].pageTo(" + i + ")"))
}
}
};
if (this.autoPlay) {
this.play()
}
};
this.leftMouseDown = function() {
if (_state != "ready") {
return
};
_state = "floating";

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有