无为清净楼资源网 Design By www.qnjia.com
复制代码 代码如下:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.8.0.min.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/jquery.easyui.min.js">
</head>
<body>
<table id="dg" title="My Users" class="easyui-datagrid" style="width:500px;height:250px"
url="getUsers.jsp"
toolbar="#toolbar" rownumbers="true"
fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="firstname" width="50">First Name</th>
<th field="lastname" width="50">Last Name</th>
<th field="phone" width="50">Phone</th>
<th field="email" width="50">Email</th>
</tr>
</thead>
</table>

</body>
</html>

复制代码 代码如下:
<%@page import="net.sf.json.JSONArray"%>
<%@page import="java.util.*"%>
<%@page import="org.codehaus.jackson.map.ObjectMapper"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
//String json = "{\"firstname\":\"firstname\",\"lastname\":\"lastname\",\"phone\":123456,\"email\":\"281446883@qq.com\"}";
List<Map<String,String list = new ArrayList<Map<String,String();
Map<String,String> user1 = new HashMap<String,String>();
user1.put("firstname", "name1");
user1.put("lastname", "name2");
user1.put("phone", "1234");
user1.put("email", "281446888@qq.com");
list.add(user1);

Map<String,String> user2 = new HashMap<String,String>();
user2.put("firstname", "name2");
user2.put("lastname", "name4");
user2.put("phone", "1234");
user2.put("email", "281446888@qq.com");
list.add(user2);

JSONArray jsonArray = JSONArray.fromObject(list);
System.out.println(jsonArray.toString());
Map<String,Object> map = new HashMap<String,Object>();
map.put("total", 1);
map.put("rows", jsonArray);

ObjectMapper objMap = new ObjectMapper();
objMap.writeValue(response.getWriter(), map);
//System.out.println(json);
%>
</body>
</html>

效果:
jquery easyui 结合jsp简单展现table数据示例
标签:
jquery,easyui,table

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。