-
nannan 数据老手Lv5
发表于2020-3-30 15:50
悬赏1
未解决
楼主
ABI的酷屏里面怎么引入表格自动播放的这个脚本?我这里添加一个JS文件后,找不到对应容器div的代号呀
functionautoScrollTable(tableDom, visibleHeight) {
var marqueesHeight = visibleHeight;
var stopscroll = false;
var scrollElem = tableDom;
var preTop = 0;
var currentTop = 0;
var stoptime = 0;
with (scrollElem) {
style.height =parseFloat(marqueesHeight) + "px";
style.overflow = 'hidden';
noWrap = true;
}
var scrollUp = function () {
if (stopscroll) {
setTimeout(scrollUp,50);
return;
}
currentTop += 1;
if (currentTop ==(marqueesHeight + 1)) {
stoptime += 1;
currentTop -= 1;
if (stoptime == 1) {
currentTop = 0;
stoptime = 0;
}
} else {
preTop =scrollElem.scrollTop;
scrollElem.scrollTop +=1;
if (preTop ==scrollElem.scrollTop) {
scrollElem.scrollTop = 0;
scrollElem.scrollTop+= 1;
}
}
setTimeout(scrollUp, 50);
};
var restartScroll = function () {
scrollElem.scrollTop = 0;
setTimeout(scrollUp, 50);
};
jQuery(tableDom).hover(function () {
stopscroll = true;
}, function () {
stopscroll = false;
});
setTimeout(restartScroll, 2000);
}
autoScrollTable(document.getElementById('GRID69'),document.getElementById("HHH57").clientHeight);
functionHHH57_fresh_callbackfunc(){
autoScrollTable(document.getElementById('GRID69'),document.getElementById("HHH57").clientHeight);
}