jqgrid.jsp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <%@ page language="java" contentType="text/html;charset=utf-8"%>
  2. <%@include file="/pages/includes/taglibs.jsp"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
  4. <html>
  5. <head>
  6. <script type="text/javascript" src="<%=request.getContextPath() %>/resource/js/jquery-1.8.3.js"></script>
  7. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/jquery.jqGrid.min.js"></script>
  8. <script type="text/ecmascript" src="<%=request.getContextPath() %>/resource/plugin/jqgrid/js/i18n/grid.locale-cn.js"></script>
  9. <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resource/plugin/jqueryui/css/custom-theme/jquery-ui-1.9.2.custom.css" />
  10. <link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath() %>/resource/plugin/jqgrid/css/ui.jqgrid.css" />
  11. <title>jqGrid Loading Data - JSON</title>
  12. </head>
  13. <body>
  14. <table id="jqGrid"></table>
  15. <div id="jqGridPager"></div>
  16. <script type="text/javascript">
  17. $(document).ready(function () {
  18. $("#jqGrid").jqGrid({
  19. url: '<%=request.getContextPath() %>/wtInfoAjax.action?wpId=NSS_FDC',
  20. mtype: "POST",
  21. datatype: "json",
  22. colModel: [
  23. { label: 'id', name: 'id', width: 75,align:'center' },
  24. { label: 'recorddate', name: 'recorddate', width: 150,align:'center' },
  25. { label: 'location', name: 'location', width: 150 ,align:'center'}
  26. ],
  27. loadonce: true,
  28. width: 780,
  29. height: 300,
  30. rowNum: 200,
  31. viewrecords: true,
  32. pager: "jqGridPager",
  33. caption: "风机日信息"
  34. });
  35. });
  36. </script>
  37. </body>
  38. </html>