JavaScript修改报表翻页

3、css控制报表上下翻页样式,将这段js代码放到表脚

<script type="text/javascript">
function changePageStyle()
{
var container = document.getElementById('CVNavLinksRS');
if (container == null)
{
container = document.getElementById('CVNavLinks_NS_');
}

if (container == null)
{
window.setTimeout(changePageStyle, 100);
return;
}

var tables = container.getElementsByTagName("table");
var pageTable = tables[0];


if (pageTable == null)
{
window.setTimeout(changePageStyle, 100);
return;
}
pageTable.parentNode.align="right";

var tdList= pageTable.getElementsByTagName("td");
var styleArray = [
['first_false','first_true',''],
['previous_false','previous_true','上一页'],
['next_false','next_true','下一页'],
['last_false','last_true','']
];
var styleIndex = 0;
for (var index = 0; index < tdList.length; index++)
{
var oTd = tdList[index];
if (index % 2 == 0)
{
oTd .innerHTML = "    ";
}
else
{
if (/ /.test(oTd.innerHTML))
{
oTd.innerHTML = oTd.innerHTML.substring(0, oTd.innerHTML.length - 6);
}
var aList = oTd.getElementsByTagName("a");
if (aList.length == 1)
{
aList[0].innerHTML='<input type="button" style="color:#000000" value="' + styleArray[styleIndex][2] + '" class="' + styleArray[styleIndex][1] + '" />';
}
else
{
oTd.innerHTML = '<input type="button" style="color:#cccccc" value="' + styleArray[styleIndex][2] + '" class="' + styleArray[styleIndex][0] + '" />';
}
styleIndex++;
}
}
pageTable.parentNode.style.backgroundColor="#E7E8EC";
if (pageTable.style.setProperty)
{
pageTable.style.setProperty("visibility","visible", "important");
}
else
{
pageTable.style.visibility = "visible";
}
}
window.setTimeout(changePageStyle, 10);
</script>
<script>
function aa()
{
alert(111);
//var divMenu = getCV().rvMainWnd.getContextMenu();


window.oCVRS.rvMainWnd.getContextMenu().getGoToMenuItem().remove();
alert(window.oCVRS.rvMainWnd.getContextMenu().getGoToMenuItem().getLabel() + ":" +window.oCVRS.rvMainWnd.getContextMenu().getGoToMenuItem().getAction());
}

</script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值