一、赋值https://www.jianshu.com/p/19156f9fac1e

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>云API</title>
<link rel="stylesheet" type="text/css" href="../css/api.css"/>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
</head>
<body>
<header>
</header>
<div id="show_list"></div>
</body>
<script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="script/api.js"></script>
<script src="https://cdn.bootcss.com/dot/1.1.2/doT.min.js"></script>
<script id="tpl" type="text/x-dot-template">
<div>Hi {{=it.name}}!</div>
<div>{{=it.age || ''}}</div>
</script>
<script type="text/javascript">
apiready = function () {
var data = {"name":"Jake","age":31};
var show_tpl = doT.template($("#tpl").text());
//$("#show_list").html(show_tpl(data)); //jq 方式
$api.html($api.byId('show_list'),show_tpl(data))
}
</script>
</html>

最新文章

  1. Linux 的 strace 命令
  2. Designing for iOS: Graphics &amp; Performance
  3. [Nginx] 关键概念解读
  4. IOS Xcode 无法识别IOS device 突然发生的
  5. ethtool 在 Linux 中的实现框架和应用
  6. .jar是什么文件?(转载)
  7. GUI编程笔记(java)05:GUI事件监听机制原理和举例说明
  8. Jetty总览
  9. 用json方法来作深拷贝应该知道的一点东西!
  10. windows sevser 2012搭建网站
  11. 通过地址获得经纬度(百度Geocoding API)
  12. 【非官方】Surging 微服务框架使用入门
  13. TextView走马灯
  14. Python-Django-Ajax进阶3
  15. Leetcode480-Binary Tree Paths-Easy
  16. oracle 查询非自增长分区的最大分区
  17. Zbrush Topogun 备忘
  18. JDBC的DBUtils源码
  19. SpringBatch Sample (五)(复合格式文件的读、多文件的写)
  20. DOM常用的属性和方法

热门文章

  1. linux 中文乱码解决办法
  2. C++ Map实践
  3. Why 0.1 + 0.2 === 0.30000000000000004 ?
  4. golang channel关闭后,是否可以读取剩余的数据
  5. golang context学习记录2
  6. Linux_Ubuntu命令概述
  7. React之生命周期函数
  8. PC端网页嵌入百度地图
  9. [转] javascript 正则表达式提取数字使用
  10. java游戏服务器 策略+简单工厂