PureJSTemplate
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/puresjstemplate
软件介绍
Works in IE, Firefox and Webkit browsers.
Most templating languages suck
Ok, if your like me then you hate all templating langauges- they suck, they really suck. I hate them because I hate the rules they enforce upon me, they are slow, and they slow me down. Because of this, usually I end up making code that looks like this:
UGLY:
function display(data) {
var output = "<div>" + data.text + "</div>";
element.innerHTML=output;
}How horrible is that? That's probably worse than using a bad templating langauge.
Well, after disappointments with other jQuery templating plugins, I decided to make my own:
The Solution: PureJSTemplate
With PureJSTemplate you use old fashioned javascript in your template. You simply surround the javascript in special tags. Here's an example of what you can do:
<#for(var i=0; i<10; i++) { #>
<#=i#>
<#}#>
That will output the numbers 0 through 9. Easy, isn't it?
Using it:
You simply surround your template code with a textarea tag:
and call it from javascript like so:
$("#output").pureJSTemplate(
{
id:"tpl",
data:{}
});
That's it.
Get The Code
改变未来的九大算法
[美] 约翰.麦考密克 / 管策 / 中信出版社 / 2013-6 / 39.00元
Google得出的搜索结果是如何产生的? 百度为何会陷入“搜索门”,又是什么机制使然? 身处在大数据时代的我们,究竟该如何应对变化莫测的世界? …… 没有满篇的专业术语,第一次让我们通过简单明了的语言、生动的例证了解支撑计算机王国的灵魂支柱——9大算法,包括人工智能、数据压缩,以及Google著名的PageRank等。 本书精彩地介绍了搜索引擎、PageRank、公开......一起来看看 《改变未来的九大算法》 这本书的介绍吧!
