本文实例讲述了jQuery调取jSon数据并展示的方法。分享给大家供大家参考。具体如下:
代码如下:
'
+ '
$.get():从指定的资源请求数据
第一个参数:jSon插件;第二个参数:json数据格式;第三个参数:function(data)方法,data为取得的json数据串
$.each(data.jsona,function(index,elem)) 参数说明: data.jsona:json数据
function(index,elem): 参数说明: index:索引 elem:相当于json数据串
接下来在
页面中的js作用: 1、绑定 2、赋值
希望本文所述对大家的jQuery程序设计有所帮助。