<HTML>
<HEAD>
<style>
.grid{
border:solid 1px #EEEEEE;
border-collapse:collapse;
height1:100%;
width:100%;
border-bottom: 1px solid #96d9f9;
font-size: 14px;
}
.grid-head{
text-align: center;
height: 28px;
font-weight: bold;
border: solid 1px inactiveborder;
}
.subtotal-column{
border: solid 1px inactiveborder;
text-align: right;
font-weight: bold;
background-color: #CCDDED;
}
.total-column{
border: solid 1px inactiveborder;
text-align: right;
font-weight: bold;
background-color: #BBDDED;
}
.subtotal-row{
border: solid 1px inactiveborder;
text-align: right;
font-weight: bold;
background-color: #CCEDDD;
}
.total-row{
border: solid 1px inactiveborder;
text-align: right;
font-weight: bold;
background-color: #AAEDDD;
}
</style>
<BODY>
<div id="aaaa"></div><BR>
<div id="bbbb"></div>
<SCRIPT LANGUAGE="JavaScript">
var table = new TableHeader();
var render = 'new Array("(2,2,时间)(1,2,收入)(1,2,支出)","(1,1,充值)(1,1,手续费)(1,1,提现)(1,1,手续费)",'
+'"(2,1,2008),(1,1,上半年)(1,1,10)(1,1,11)(1,1,12)(1,1,13)","(1,1,下半年)(1,1,2000)(1,1,21)(1,1,22)(1,1,23)",'
+'"(2,1,2009),(1,1,上半年)(1,1,20)(1,1,21)(1,1,22)(1,1,23)","(1,1,下半年)(1,1,30)(1,1,31)(1,1,32)(1,1,33)")';
table.buildRender(render);
table.toUI();
//document.getElementById("aaaa").innerHTML = table.tableObj.outerHTML;
table.subTotalRow("全年",1,1, 2,3, "subtotal-row");
table.subTotalRow("全年",1,1, 5,6, "subtotal-row");
table.addStatRow("合计","$4+$7", 8,0,2, "total-row");
table.subTotalColumn("小计",1,1, 2,3, "subtotal-column");
table.subTotalColumn("小计",1,1, 5,6, "subtotal-column");
table.addStatColumn("总计","$4+$7", 0,8,2, "total-column");
//table.deleteRow(7);
//table.deleteRow(4);
//table.deleteColumn(8);
//table.tableObj.rows[7].deleteCell(7);
table.formatNumbit(2,8, 2,8, 1, true);
document.getElementById("bbbb").innerHTML = table.tableObj.outerHTML;
</SCRIPT>
</BODY>
</HTML>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛