echarts_04
通过ajax加载本地文件:
1.http://www.cnblogs.com/qjqcs/archive/2016/09/07/5850282.html
2.http://blog.csdn.net/sheila1227/article/details/44035561
3.http://blog.csdn.net/sheila1227/article/details/44157117
4.http://blog.csdn.net/dandanzmc/article/details/31344267/
5.http://www.cnblogs.com/xiaojinhe2/archive/2011/10/12/2208740.html
6.http://www.cnblogs.com/leejersey/p/3750232.html
7.http://www.2cto.com/kf/201412/357442.html
8.https://my.oschina.net/crazymus/blog/345586
9.http://blog.csdn.net/zhangdaiscott/article/details/18456215
10.http://www.php100.com/manual/jquery/serialize.html
11.http://www.php100.com/manual/jquery/jQuery.Ajax.html
jQuery插件之json篇:
12.http://www.cnblogs.com/luluping/archive/2009/04/22/1441495.html
HTML文件:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title>
<script src="jquery-2.0.0.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
//请求方式为get
type:"GET",
//json文件位置
url:"user.json",
//返回数据格式为json
dataType: "json",
//请求成功完成后要执行的方法
success: function(data){
//使用$.each方法遍历返回的数据date,插入到id为#result中
$.each(data,function(i,item){
var content=item.name+","+item.email+","+item.gender+
","+item.hobby[0]+","+item.hobby[1]+"</br>";
$("#result").append(content);
})
}
})
});
</script>
</head> <body>
<dir id="result">1</dir>
</body> </html>
json文件:
[
{"name":"哈哈··","email":"邮箱01","gender":"男","hobby":["上网","打球"]},
{"name":"呵呵··","email":"邮箱02","gender":"男","hobby":["网购","打球"]}
]
echarts_04的更多相关文章
随机推荐
- 08 Python之内存管理
python中的内存管理,从浅层次来说,可以分为3个方面来讲: 1,引用计数: python中引用计数,为了跟踪内存的对象 当创建对象的时候即被引用了,当对象不再被使用时,即某个对象的引用计数为0,它 ...
- skywalking 6.1 简明指南
skywalking 分布式系统的应用程序性能监视工具,专为微服务.云本机架构和基于容器(Docker.K8s.Mesos)架构而设计 背景 随着微服务架构的流行,一些微服务架构下的问题也会越来越突出 ...
- composer问题集锦
问题一:composer遇到Your configuration does not allow connection to 解决方案: 设置一个本地或全局的composer配置: composer c ...
- @InitBinder的作用
由@InitBinder表示的方法,可以对WebDataBinder对象进行初始化.WebDataBinder是DataBinder的子类,用于完成由表单到JavaBean属性的绑定. @InitBi ...
- Linux性能分析命令工具汇总
转自:http://rdc.hundsun.com/portal/article/731.html?ref=myread 出于对Linux操作系统的兴趣,以及对底层知识的强烈欲望,因此整理了这篇文章. ...
- HDU - 4431 Mahjong (模拟+搜索+哈希+中途相遇)
题目链接 基本思路:最理想的方法是预处理处所有胡牌的状态的哈希值,然后对于每组输入,枚举每种新加入的牌,然后用哈希检验是否满足胡牌的条件.然而不幸的是,由于胡牌的状态数过多(4个眼+一对将),预处理的 ...
- poj3208 Apocalypse Someday[数位DP]
数位中出现至少3个连续的'6'的数字(称魔鬼数),询问满足要求的排名k的数. 经典题型.采用试填法. 递推做法:预处理出$i$位数字中满足要求的数(下记为'魔鬼数').对每一位都从0到9试一遍,然而卡 ...
- PHP循环while do while循环
<?php #从1打印到10,除了5 $i=1; while ($i<10) { if ($i==5) { $i++; continue; } echo $i++."<br ...
- 【weblogic】WTC配置(Weblogic Tuxedo Connector)
记录下工作中涉及到的WTC使用 WTC 是BEA 的WEB支持产品Weblogic和中间件产品Tuxedo之间的连接工具,全称Weblogic Tuxedo Connector.WTC使Weblogi ...
- 【leetcode】1237. Find Positive Integer Solution for a Given Equation
题目如下: Given a function f(x, y) and a value z, return all positive integer pairs x and y where f(x,y ...