jquery jtemplates.js模板渲染引擎的详细用法第一篇

Author:ching

Date:2016-06-29

jTemplates是一个基于JQuery的模板引擎插件,功能强大,有了他你就再不用为使用JS绑定数据时发愁了。后端语言使用php,asp.net,jsp等都不是问题,使用模板渲染可以很大程度上提高程序性能,使用异步获取数据,不用整个页面都回发,好处当然不仅仅是这些。

下载jtemplates,官网的文档写得非常的详细

打开官网:http://jtemplates.tpython.com/

左侧找到Download,然后直接点击要下载的文件即可,当前最新版本是0.8.4

jTemplates配合jQuery的delegate事件处理方法可以让你迷恋无法自拔。哈哈...

下面是详细用法总结:

jtemplates模板的简单使用,首先使用jtemplates就要使用json数据,在这里我们不妨构造一个json格式的数据,如下:

{
"name" : "网马伦",
"list_id" : 89757,
"table":[
{"id": 1, "name": "Rain", "age": 22, "mail": "admin@domain.com"},
{"id": 2, "name": "皮特", "age": 24, "mail": "123456@domain.com"},
{"id": 3, "name": "卡卡", "age": 20, "mail": "112233@domain.com"},
{"id": 4, "name": "戏戏", "age": 26, "mail": "0147@domain.com"},
{"id": 5, "name": "一揪", "age": 25, "mail": "kkw@domain.com"}
]
}

接下来新建一个页面jtemplates_demo1.html

然后引入jquery,我这里使用的是jquery-2.1.1.min.js,你可以在这里下载http://www.jquery.com/

引入js文件代码如下:

<script type="text/javascript" src="./js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="./js/jquery-jtemplates.min.js"></script>

接下来构造模板样式

代码如下:

          <textarea id="template" class="template">
<div><strong>部门编号:{$T.list_id}</strong></div>
<div><strong>负责人:{$T.name} </strong></div>
<div>
<table>
<tr>
<th>编号</th>
<th>姓名</th>
<th>年龄</th>
<th>邮箱</th>
</tr>
{#foreach $T.table as record}
<tr>
<td>{$T.record.id}</td>
<td>{$T.record.name}</td>
<td>{$T.record.age}</td>
<td>{$T.record.mail}</td>
</tr>
{#/for}
</table>
</div>
</textarea>

这个是我要最终显示的效果,也就是模板,然后模板定义好了,然后我们在定义一个最后用来承载显示数据的标签,一般用div或者其他标签均可,我这里使用div如下:

<div id="result"></div>

此时我们的显示数据的前台HTML标签就写好了,模板和result这两个的顺序没有要求,但是为了阅读方便这里使用如下顺序放置:

<div id="result"></div>
<textarea id="template" class="template">
<div><strong>部门编号:{$T.list_id}</strong></div>
<div><strong>负责人:{$T.name} </strong></div>
<div>
<table>
<tr>
<th>编号</th>
<th>姓名</th>
<th>年龄</th>
<th>邮箱</th>
</tr>
{#foreach $T.table as record}
<tr>
<td>{$T.record.id}</td>
<td>{$T.record.name}</td>
<td>{$T.record.age}</td>
<td>{$T.record.mail}</td>
</tr>
{#/for}
</table>
</div>
</textarea>

接下来就要在js中设置模板和处理数据啦,直接上代码,然后在解释代码的意思,代码如下:

<script type="text/javascript">
$(function(){
// 初始化JSON数据
var data = {
"name" : "网马伦",
"list_id" : 89757,
"table":[
{"id": 1, "name": "Rain", "age": 22, "mail": "admin@domain.com"},
{"id": 2, "name": "皮特", "age": 24, "mail": "123456@domain.com"},
{"id": 3, "name": "卡卡", "age": 20, "mail": "112233@domain.com"},
{"id": 4, "name": "戏戏", "age": 26, "mail": "0147@domain.com"},
{"id": 5, "name": "一揪", "age": 25, "mail": "kkw@domain.com"}
]
}; // 设置模板
$("#result").setTemplateElement("template");
// 给模板加载数据
$("#result").processTemplate(data);
});
</script>

首先我们在前面直接引用了jQuery,在这里直接写在$(function(){});里面就可以了,

$("#result").setTemplateElement("template");这一步非常关键,解释如下:

这一步的意思就是讲id="result"的div设置模板为id="template",然后就是处理数据,这里的打他就是json数据,这样就可以直接显示json数据了,这就是模板渲染,简单吧,下面是全部代码如下:

<!doctype html>

<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery - jTemplates</title>
<link rel="stylesheet" type="text/css" href="./css/style.css">
<script type="text/javascript" src="./js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="./js/jquery-jtemplates.min.js"></script>
<style type="text/css">
.container{
width: 1000px;
height: 600px;
margin: 0 auto;
}
.template{
display: none;
}
table{
background-color: #fff;
}
table tr th{
padding: 8px;
border-bottom: 1px solid #eee;
}
table tr td{
padding: 10px;
border-bottom: 1px solid #eee;
}
</style>
<script type="text/javascript">
$(function(){
// 初始化JSON数据
var data = {
"name" : "网马伦",
"list_id" : 89757,
"table":[
{"id": 1, "name": "Rain", "age": 22, "mail": "admin@domain.com"},
{"id": 2, "name": "皮特", "age": 24, "mail": "123456@domain.com"},
{"id": 3, "name": "卡卡", "age": 20, "mail": "112233@domain.com"},
{"id": 4, "name": "戏戏", "age": 26, "mail": "0147@domain.com"},
{"id": 5, "name": "一揪", "age": 25, "mail": "kkw@domain.com"}
]
}; // 设置模板
$("#result").setTemplateElement("template");
// 给模板加载数据
$("#result").processTemplate(data);
});
</script>
</head>
<body>
<div class="container">
<div><h1>标题</h1></div>
<div id="result"></div>
<textarea id="template" class="template">
<div><strong>部门编号:{$T.list_id}</strong></div>
<div><strong>负责人:{$T.name} </strong></div>
<div>
<table>
<tr>
<th>编号</th>
<th>姓名</th>
<th>年龄</th>
<th>邮箱</th>
</tr>
{#foreach $T.table as record}
<tr>
<td>{$T.record.id}</td>
<td>{$T.record.name}</td>
<td>{$T.record.age}</td>
<td>{$T.record.mail}</td>
</tr>
{#/for}
</table>
</div>
</textarea> <!-- <textarea id="templateContainer" style="display: none;">
<table>
<tr>
<td>Id</td>
<td>标题</td>
<td>发布时间</td>
</tr>
{#foreach $T.Lists as row}
<tr>
<td>{$T.row.Id}</td>
<td>{$T.row.Title}</td>
<td>{$T.row.CreateDate}</td>
</tr>
{#/for}
</table>
</textarea> -->
</div>
</body>
</html>

这里需要注意几点:

1、首先模板样式必须要用<textarea></textarea>标签,否则也可以放入

<script id="template">
<div><strong>部门编号:{$T.list_id}</strong></div>
<div><strong>负责人:{$T.name} </strong></div>
<div>
<table>
<tr>
<th>编号</th>
<th>姓名</th>
<th>年龄</th>
<th>邮箱</th>
</tr>
{#foreach $T.table as record}
<tr>
<td>{$T.record.id}</td>
<td>{$T.record.name}</td>
<td>{$T.record.age}</td>
<td>{$T.record.mail}</td>
</tr>
{#/for}
</table>
</div>
</script>

中,都是可以的

2、json格式必须是正确的,而且不能用单引号,都是双引号

最终显示效果如下:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgIAAAGxCAIAAACfkUndAAAgAElEQVR4nO3dTag0153f8QJtBOZZCW0eqI0QgTCgRRCIszCzEWYwwXhhLkGghXZDQBxvDMHG4MXgm5UDo42H4WwMwQo4A9cZHEZMMFM4JlHiMTcxdjJKWX4fhVbEsxHiAUFlcapO/c9LVVf1re6uqvP9rJ7ndnXV6eru/++8VHcXDQAgY8W1GwAAuCZiAACyRgwAQNaIAQDIGjEAAFkjBgAga8QAAGSNGACArBEDAJA1YgAAskYMAEDWiAEAyBoxAABZIwYAIGvEAABkjRgAgKwRAwCQta3HwEGrsmip+tqtAYDNIQaG1Ko4zlR1ZfSEDVul0oclGwkAD7XbGDB6ShkPyD0QAwCyQAwQAwCyRgwcjwGljTxkXRkZA0GDZCp85Ts/Pt8jB4BFEAMLx8D3vvGFkVsBYG02GQPH5mEWWSueOink3+uTb73+UndjWdXMAAFYO2JgyPQYmLRlwcIAgFUiBoYQAwCyQAwMmb42QAwA2LBNxoDz+5/94LlE9ZfrxnO5Cf1TYiDY0nKL1cQAgBXadgy889YbooKfKwZGEAMAtm7TMfCHN/7o+RXGgKv7wX+JAQArtOEYeP/dtz/j1eRX3nv6adM0xAAATLfdGPjkrTdeDorycy989m9++t6ng3fxKvtyn+0iBgBs2FZj4Mlv330x3UF/5ktf+csPPn6autPUGJCLwMeomhgAsGUbjYFP3/7a50dq8z//6nefNs0PvvXGS69+0fy7v/3Nh0+apknGwJMPf/N9882XHr/y7m+fuL0/LAY+/Mofv0AMANiKTcbAoa5Sc//PPPvsM0VRPHr8J//w5JOm+f3rL7qrSe2MfxAD/2C+/Ooz3X/feOsdt/+HxcCvv/B8u2ahTdUQAwDWbZMx8N2vfq4r/C+88vJjV4R/9sF7X3/t83/1k181/gJyV3/D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n1VSZXXu5r5mx4AMj+DUuSuFFmwztmXPMRBcmbPZK0e9zr6LAdk59a95X4D82JoTFAh3QdPF3vlBpesKtLtAKLyWyQ8J+QJIX0zpVhEmkldM2Vk7vzftfRvHaD99vKT2+1HanDYpFHxgwm/bOdqMLdl3DGxedDV6W/0P0QcFzvwp4kyEHyyw/EVjYG+IASBQB0OhzY4jgUmIAQDIGjEAAFkjBgAga8QAAGSNGACArBEDAJA1YgAAskYMAEDWiAEAyBoxAABZIwYAIGvEAABkjRgAgKxtOAY+Wpl1tiqwzkaus1XYhOtUn33ZcAwAAB6OGACArBEDAJA1YgAAskYMAEDWiAEAyBoxAABZIwYAIGvEAABkjRgAgKwRAwCQNWIAALJGDABA1ogBAMgaMQAAWSMGACBrxAAAZI0YAICsEQMAkDViAACyRgwAQNaIAQDIGjEAAFkjBgAga8QAAGSNGACArBEDAJA1YgAAskYMAEDWiAEAyBoxAABZIwYAIGvEAABkjRgAgKwRAwCQNWIAALJGDABA1ogBAMgaMQAAWSMGACBrxAAAZI0YAICsEQMAkDViAACyRgwAQNaIAQDIGjEAAFkjBgAga/8fy9uXDkBNvokAAAAASUVORK5CYII=" alt="" />

jquery jtemplates.js模板渲染引擎的详细用法第一篇的更多相关文章

  1. jquery jtemplates.js模板渲染引擎的详细用法第二篇

    jquery jtemplates.js模板渲染引擎的详细用法第二篇 关于jtemplates.js的用法在第一篇中已经讲过了,这里就直接上代码,不同之处是绑定模板的方式,这里讲模板的数据专门写一个t ...

  2. jquery jtemplates.js模板渲染引擎的详细用法第三篇

    jquery jtemplates.js模板渲染引擎的详细用法第三篇 <span style="font-family:Microsoft YaHei;font-size:14px;& ...

  3. template.js 数据渲染引擎

    template.js 数据渲染引擎 template.js是一款JavaScript模板引擎,用来渲染页面的. 原理:提前将Html代码放进编写模板 <script id="tpl& ...

  4. jquery validate.js表单验证的基本用法入门

    这里转载一篇前辈写的文章,在我自己的理解上修改了一下,仅作记录. 先贴一个国内某大公司的代码: 复制代码 代码如下: <script type="text/javascript&quo ...

  5. jquery.tmpl.js 模板引擎用法

    1.0 引入: <script src="/js/jquery.tmpl.min.js"></script> 2.0 模板: <script type ...

  6. nunjucks.js模板渲染

    直接用 script 引入文件: <script src="nunjucks.js"></script> 是使用 render 来直接渲染文件,这种方式支持 ...

  7. Html模板渲染引擎Hogan

    Github:https://github.com/twitter/hogan.js 最简单的使用教程:http://www.imooc.com/article/18493

  8. spring Boot+spring Cloud实现微服务详细教程第一篇

    前些天项目组的大佬跟我聊,说项目组想从之前的架构上剥离出来公用的模块做微服务的开发,恰好去年的5/6月份在上家公司学习了国内开源的dubbo+zookeeper实现的微服务的架构.自己平时对微服务的设 ...

  9. (4)Flask项目模板渲染初体验

    一.准备静态资源 将项目使用到的静态资源拷贝到static目录 二.创建前台首页html 创建templates/home/home.html页面,内容包含导航和底部版权两部分,中间内容区域为模板标签 ...

随机推荐

  1. CSS3 3D下拉折叠菜单

    在线演示 本地下载

  2. poj The Settlers of Catan( 求图中的最长路 小数据量 暴力dfs搜索(递归回溯))

    The Settlers of Catan Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 1123   Accepted: ...

  3. 粉红色织梦CMS企业模板

    粉红色织梦CMS企业网站模板,粉红色,织梦CMS,织梦企业模板,CMS模板. 模板地址:http://www.huiyi8.com/sc/7247.html

  4. JS事件派发器EventEmitter

    原文地址:http://zhangyiheng.com/blog/articles/js_event_mitter.html 需求 随着Browser客户端JS越来越复杂,MVC(Client端)设计 ...

  5. [原创]Java动态生成word文档(图文并茂)

    很多情况下,软件开发者需要从数据库读取数据,然后将数据动态填充到手工预先准备好的Word模板文档里,这对于大批量生成拥有相同格式排版的正式文件非常有用,这个功能应用PageOffice的基本动态填充功 ...

  6. openfire开发环境(3.9.1)

    1.解压源码 2.把build/eclipse中的文件cp到源码跟目录,并修改文件名,前面增加"."号,变成eclipse工程. 3.导入eclipse, 把build/lib/, ...

  7. python读文件出现中文乱码

    更新: 一个解释更详细和全面的博文:https://www.cnblogs.com/zhangqigao/p/6496172.html 最近开始处理中文文本,读取文件有时候会出现乱码.原因:编码和解码 ...

  8. linux命令学习笔记-eval命令详解

    功能说明:重新运算求出参数的内容. 语 法:eval [参数] 补充说明:eval可读取一连串的参数,然后再依参数本身的特性来执行. 参 数:参数不限数目,彼此之间用分号分开. .eval命令将会首先 ...

  9. zero to one(1)

    How to google 这两天把之前的过期的账号重新弄了一下,在vutrl上的账号,普通的话现在2.5$只提供ipv6地址,如果是想google我觉得这个应该没有什么问题,或者可以买***的账号, ...

  10. ActivityMq的使用(小例子)

    一.ActivityMq的介绍: 1.什么是消息中间件?与传统的传输通讯有什么区别? 异步,无需等待,消息存放在队列里面. 2.为什么要使用消息中间件? 消息中间件可以解决高并发. 两种通讯方式:01 ...