<html>
<head>
<style>
#tb001{
border-collapse: collapse;
width: 600px;
border: 1px solid blue;
}
</style>
<script src="mergerow.js"></script>
<script>
var data = [
{col1:11001,col2:21001,col3:31001,col4:41001},
{col1:11001,col2:21002,col3:31002,col4:41002},
{col1:11001,col2:21002,col3:31003,col4:41003},
{col1:11004,col2:21004,col3:31004,col4:41004},
{col1:11004,col2:21004,col3:31005,col4:41005},
{col1:11004,col2:21006,col3:31006,col4:41006},
{col1:11007,col2:21007,col3:31007,col4:41007},
{col1:11008,col2:21008,col3:31008,col4:41008},
{col1:11008,col2:21008,col3:31008,col4:41009},
{col1:11008,col2:21008,col3:31010,col4:41010},
{col1:11008,col2:21011,col3:31011,col4:41011},
{col1:11012,col2:21012,col3:31012,col4:41012},
{col1:11012,col2:21012,col3:31012,col4:41012},
{col1:11014,col2:21014,col3:31014,col4:41014},
{col1:11015,col2:21015,col3:31015,col4:41015}
];
window.onload = function(){
var start = new Date().getTime();
new MergeRow(['col1','col2','col3'],data).renderTbl('td001');
console.log('耗时(毫秒):',(new Date().getTime() - start));
}
</script>
</head>
<body>
<table border="1" id="tb001">
<thead>
<th>col1</th>
<th>col2</th>
<th>col3</th>
<th>col4</th>
</thead>
<tbody id="td001">
</tbody>
</table>
</body>
</html>
评论0