一种非侵入式的模板系统更新HTML内容使用javscript数据集
2016-08-23
0 0 0
暂无评分
其他
如何获取积分?
JOT is A non-intrusive template system for updating html content using javscript data set
Examples
Example 1 - Simple text and attributes replacement ``` <!-- Embed data name using id attribute, you can also use var if you need change element's attributes or you don't like repeating ids -->
<!-- mapping written in JS object {attrname: keyname}
following IMG's src will be changed to data['avatar]
alt will be changed to data['firstname']
-->
<!-- Simple mapping, id is the key name of the data you passed-->
Name:
Dob:
</div>
<script>
person = {
firstname: 'William',
lastname: 'Yang',
dob: '1979-09-10',
avatar: 'me.jpg',
}
// Update above html block above with person
$('#person > *').jot(person)
</script>
```
Example 2 - Bloc
html
模板
系统
更新
内容
使用
数据
侵入
javscript
相关源码推荐
线性回归分析
0
0
暂无评分
3d建筑物大屏呈现
0
0
暂无评分
利用线性差值处理空值
0
0
暂无评分
lianjia房yuan爬虫
0
0
暂无评分
生成所有子集
0
0
暂无评分
暂无评论