esayUI两层表头列表实现+点击列名排序

这是一个使用jQuery EasyUI实现的两层表头列表,包含点击列名进行排序的功能。示例代码展示了如何创建带有分类头部的表格,并定义了行点击事件`onClickRow`,展示如何获取选中行的数据。同时,列定义包括不同类型的视频督察统计数据。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Column Group - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="../../jquery.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
</head>
<body>
     <script type="text/javascript">
        function ClickRow(rowIndex, rowData) {

                       alert(rowIndex+'这是Name:' + rowData.itemid + '这个是ID:' + rowData.ID);            
            //if (rowData.ModuleModel == 'DDS3366L') {
//     alert();
            //    document.getElementById("Archives").src = "real-time/ArchivesForE_P.aspx?ModuleID=" + rowData.ID;
          //  }
//alert(123);
        } 
    </script>
<h2>Column Group</h2>
<p>The header cells can be merged. Useful to group columns under a category.</p>
<div style="margin:20px 0;"></div>
<table class="easyui-datagrid" title="Column Group" style="width:700px;height:350px" pagination="true"
data-options="rownumbers:true,singleSelect:true,url:'datagrid_data3.json',method:'get',onClickRow:ClickRow">
<thead>
<tr>
<th data-options="field:'itemid', sortable:true,width:80" rowspan="2">督察机构</th>
<th data-options="field:'productid',width:100" rowspan="2">问题总数</th>
<th colspan="4">视频督察</th>
</tr>
<tr>
<th data-options="field:'listprice',width:80,align:'center'">类型1</th>
<th data-options="field:'unitcost',width:80,align:'center'">类型2</th>
<th data-options="field:'attr1',width:240">类型3</th>
<th data-options="field:'status',width:60,align:'center'">类型4</th>
</tr>
</thead>
</table>


</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值