Domplate
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/domplate
软件介绍
Overview
The Domplate jquery plugin provides an advanced template system taken and modified from Firebug.
Features:
- Templates are assembled via function calls instead of strings
- User-defined callbacks to iterate and format data
- Object oriented design allows for advanced hierarchies
NOTE: This plugin although functional has not had much actual use outside of the Firebug Firefox extension. It works well with Firefox but may have some problems with other browsers.
You can find more information here: http://code.google.com/p/domplate/
and here: http://www.christophdorn.com/Blog/category/domplate/
If you are interested in helping out to make this plugin cross-browser compatible, please express your interest on the discussion group.
Sample Code
<html>
<head>
<script type="text/javascript" src="lib/jquery/jquery.js"></script>
<script type="text/javascript" src="lib/jquery/jquery-domplate.js"></script>
<script>
$(document).ready(function(){
with($.domplate) {
var rep = $.domplate.create(
{
tpl: DIV({style:'border: 1px solid red; padding: 10px;'},
FOR("item", "$items|arrayIterator",
DIV({style:'border: 1px solid blue; margin-top: 5px; padding: 10px;'},'$item.msg')
)),
arrayIterator: function(array)
{
var items = [];
for (var i = 0; i < array.length; ++i) {
var value = array[i];
items.push(value);
}
return items;
}
});
var tpl = DIV({style:'border: 1px solid red; padding: 10px;'},'Hello World');
}
$('#body1').render(tpl);
var items = [
{msg:'Line1'},
{msg:'Line2'}
];
$('#body2').render(rep.tpl, {items:items}, rep);
});
</script>
</head>
<body>
<div id="body1"></div>
<div id="body2"></div>
</body>
</html>勇敢新世界‧互聯網罪與罰
許煜、劉細良 / CUP / 2005 / $48
我天天上網數小時,為的是要在節目裡面介紹世界的最新動態,尤其是網絡這個世界本身日新月異的變化。所以我不可能不注意到BT、共享軟件、 Wikipedia、網絡監管等各種影響政治、社會、經濟及文化的重要網絡現象。但是我發現市面上一直沒有一本內容充實全面,資料切時的中文參考書,直到這本《互聯網罪與罰》。而且,最大的驚喜是它易讀好看,簡直就像故事書。 梁文道 鳳凰衛視 《網羅天下......一起来看看 《勇敢新世界‧互聯網罪與罰》 这本书的介绍吧!
