源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

jQuery easyui datagrid动态查询数据实例讲解

  • 时间:2021-09-09 23:49 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:jQuery easyui datagrid动态查询数据实例讲解
该插件组小巧使用方便,以下是一个从前台提交查询条件,从MSSQL返回json数据的一个事例 [b]HTML前端代码[/b]
[url=/inc/js/EasyUI/themes/default/easyui.css]<link rel="stylesheet" type="text/css" href="/inc/js/EasyUI/themes/icon.css"> <script type="text/javascript" src="/inc/js/EasyUI/jquery-1.8.0.min.js"></script> <script type="text/javascript" src="/inc/js/EasyUI/jquery.easyui.min.js"></script> <script> function FindData(){ $('#mytable').datagrid('load',{ PersonCode:$('#PersonCode').val(), KQYM:$('#KQYM').val()} ); } </script> </head> <body> <table id='mytable' class="easyui-datagrid" style="width:600px;height=500px" url="loadgriddata_get.php" title="请输入查询条件" rownumbers="true" toolbar="#searchtool" loadMsg="正在查询..."> <thead> <tr> <th field="PersonCode" Width="80">工号</th> <th field="MyName" width="80">姓名</th> <th field="KQDate" width="100">考勤日期</th> <th field="MyWeek" width="80">星期</th> <th field="KQMemo" width="200">打卡时间</th> </tr> </thead> </table> <div id="searchtool" style="padding:5px"> <span>工号:</span><input type="text" id="PersonCode" value="" size=10 /> <span>考勤年月:</span><input type="text" id="KQYM" value="" size=10 />   <a href="javascript:FindData()" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a> <div> </body> </html>
以下是取数据集,并将数据组装成json对象返回给前台的php代码 以下为效果图 [img]http://files.jb51.net/file_images/article/201302/2013226155548927.png?2013126155618[/img]
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部