js多张图片自右向左滚动
只需设置容器宽度和滚动盒子宽度即可,滚动元素设置id=marquee2
<script type="text/javascript">
var AutoScroll_cont = function (a, b, c, d) {
this.frameId = a;
this.frameWidth = b; //滚动框宽度
this.speed = c; //移动速度(单位毫秒,越小越快)
this.space = d; //每次移动像素(单位px,越大越快)
this._timeoutObj = null;
}
AutoScroll_cont.prototype = {
$: function (id) {
return document.getElementById(id)
},
begin: function () {
if (!this.$(this.frameId)) {
return
};
this.$(this.