5e25865a7d2fee72d12be6beddfc6b8eb1d4156d.svn-base 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title></title>
  6. <!--框架必需start-->
  7. <script type="text/javascript" src="../../libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="../../libs/js/language/cn.js"></script>
  9. <script type="text/javascript" src="../../libs/js/framework.js"></script>
  10. <link href="../../libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  11. <link rel="stylesheet" type="text/css" id="skin" prePath="../../"/>
  12. <link rel="stylesheet" type="text/css" id="customSkin"/>
  13. <!--框架必需end-->
  14. <!--数据表格start-->
  15. <script src="../../libs/js/table/quiGrid.js" type="text/javascript"></script>
  16. <!--数据表格end-->
  17. <script type="text/javascript" src="../../sample_html/datagrid/data.js"></script>
  18. </head>
  19. <body>
  20. <div class="box1">
  21. <button type="button" style="width:200px;" onclick='loaddataHandler()'>点击加载数据</button>
  22. </div>
  23. <div class="padding_right5">
  24. <div id="maingrid"></div>
  25. </div>
  26. <script type="text/javascript">
  27. function loaddataHandler(){
  28. g.loadData(testData);
  29. }
  30. //数据表格使用
  31. var g;
  32. function initComplete(){
  33. g = $("#maingrid").quiGrid({
  34. columns: [
  35. //frozen:true 将该列冻结,在左侧显示
  36. { display: '姓名', name: 'name', align: 'center', width: "30%"},
  37. { display: '性别', name: 'sex', align: 'center' , width: "20%"},
  38. { display: '部门', name: 'deptName', align: 'center' , width: "30%"},
  39. { display: '学历', name: 'degree', align: 'center', width: "20%" }
  40. ], pageSize: 500, rownumbers:true, checkbox:true,percentWidthMode:true,
  41. height: '100%', width:"100%"
  42. });
  43. }
  44. </script>
  45. </body>
  46. </html>