参考了帆软文档 “JS实现决策报表中滚屏/跑马灯效果”,但是出现了两个问题:一是滚动条没有消失,二是并没有滚屏/跑马灯效果请问哪里出错了JS代码如下:------------------------------------------------------------------------------------------ setTimeout(function() {
//隐藏报表块左下滚动_c的滚动条(此报表块名为左下滚动_c,根据具体情况修改)
$("div").find(".frozen-north").css({
'overflow-x':'hidden',
'overflow-y':'hidden'
});
$("div").find(".frozen-center").css({
'overflow-x':'hidden',
'overflow-y':'hidden'
});
},1000);
window.flag1 = true;
var self1 = this;
//鼠标悬停,滚动停止
setTimeout(function() {
$("div").find(".frozen-center").mouseover(function() {
window.flag1 = false;
});
//鼠标离开,继续滚动
$("div").find(".frozen-center").mouseleave(function() {
window.flag1 = true;
});
var old = -1;
var interval = setInterval(function() {
if (!self1.isVisible()) {
return;
}
if (window.flag1) {
currentpos1 = $("div").find(".frozen-center").scrollTop;
if (currentpos1 == old && 0!=currentpos1) {
$("div").find(".frozen-center").scrollTop = 0;
} else {
old = currentpos1;
//以25ms的速度每次滚动1.5PX
$("div").find(".frozen-center").scrollTop = currentpos1 + 1.5;
}
}
},
25);
},
1000); ------------------------------------------------------------------------------------------源文件:决策报表.frm