关于json+jquery的问题 如何遍历json数组
HTML:
部分Json:
完整Json :http://pic.ofcard.com/cloudshop/qmopen/elife/items_localLife.js
<h2> 生活缴费
<select id="provinceMenu" class="pd410"><option ></option></select>
<select id="cityMenu" class="pd410"><option ></option></select></h2>
</div> <div class="con_jf"><h4>缴费单位:</h4><select class="pd410"><option>福州市自来水公司</option></select></div>
<div class="con_jf"><h4>户号:</h4><input class="pd410" name="account" id="account" maxlength="40" type="text"></div>
<div class="con_jf"><h4>缴费金额:</h4><input class="pd410" name="account" id="account" maxlength="40" placeholder="任意充" type="text"></div>
</div>
<div class="con disn" id="con2">
<div class="con_jf"><h4>缴费单位:</h4><select class="pd410"><option>福州市自来水公司</option></select></div>
<div class="con_jf"><h4>燃气费户号:</h4><input class="pd410" name="account" id="account" maxlength="40" type="text"></div>
<div class="con_jf"><h4>缴费金额:</h4><input class="pd410" name="account" id="account" maxlength="40" placeholder="任意充" type="text"></div>
</div>
<div class="con disn" id="con3">
<div class="con_jf"><h4>缴费单位:</h4><select class="pd410"><option>福州市自来水公司</option></select></div>
<div class="con_jf"><h4>户号:</h4><input class="pd410" name="account" id="account" maxlength="40" type="text"></div>
<div class="con_jf"><h4>缴费金额:</h4><input class="pd410" name="account" id="account" maxlength="40" placeholder="任意充" type="text"></div>部分Json:
varitems_localLife={
"RECORDS": [
{
"cityList": [
{
"cityId": "v2132",
"cityName": "兰州",
"projectList": [
{
"projectId": "c2680",
"projectName": "电费",
"unitList": [
{
"modeList": [
{
"itemList": [
{
"itemId": "6496900",
"itemName": "甘肃兰州 兰州供电公司 电费户号 任意充直充"
}
],
"modeId": "v2620",
"modeName": "户号"
}
],
"unitId": "v75886",
"unitName": "兰州供电公司"
},
{
"modeList": [
{
"itemList": [
{
"itemId": "64190201",
"itemName": "甘肃兰州 甘肃省电力公司 电费 户号 直充任意充"
}
],
"modeId": "v2620",
"modeName": "户号"
}
],
"unitId": "v81322",
"unitName": "甘肃省电力公司"
}
]
}
]
},
"provinceId": "v1955",
"provinceName": "浙江"
},
完整Json :http://pic.ofcard.com/cloudshop/qmopen/elife/items_localLife.js
...全文
相关推荐
Jquery遍历Json数据的方法
主要介绍了Jquery遍历Json数据的方法,涉及jQuery遍历json格式数据的相关技巧,非常具有实用价值,需要的朋友可以参考下
详解javascript对数组和json数组的操作
主要介绍了javascript对数组和json数组的操作,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
jQuery中使用each处理json数据
主要介绍了jQuery中使用each处理json数据,非常简单实用,需要的朋友可以参考下
jQuery对JSON数据进行排序输出的方法
主要介绍了jQuery对JSON数据进行排序输出的方法,涉及jQuery中getJSON与sort等方法的使用技巧,需要的朋友可以参考下
js/jquery解析json和数组格式的方法详解
本篇文章主要是对js/jquery解析json和数组格式的方法进行了详细的介绍,需要的朋友可以过来参考下,希望对大家有所帮助


