| <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css"> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/color.css"> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/demo/demo.css"> <script type="text/javascript" src="/mine/easyui/jquery.min.js"></script> <script type="text/javascript" src="/mine/easyui/jquery.easyui.min.js"></script> </head> <body> <table id="dg" title="My Users" style="width:550px;height:250px" toolbar="#toolbar" idField="id" rownumbers="true" fitColumns="true" singleSelect="true"> <thead> <tr> <th field="id" width="50" editor="{type:‘validatebox‘,options:{required:true}}">ID</th> <th field="user_id" width="50" editor="{type:‘validatebox‘,options:{required:true}}">UID</th> <th field="time" width="50" editor="text">TIME</th> <th field="type" width="50" editor="{type:‘validatebox‘,options:{required:‘true‘}}">TYPE</th> </tr> </thead> </table> <script> $(‘#dg‘).datagrid({ url: ‘/index/index/test2‘, }); </script> </body> </html> |